Bitcoin Forum
May 09, 2024, 10:26:59 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Recommended python library for beginners?  (Read 153 times)
zander1983 (OP)
Member
**
Offline Offline

Activity: 65
Merit: 24


View Profile
December 25, 2022, 01:16:53 PM
Merited by hugeblack (4), OmegaStarScream (3)
 #1

Hi
Im new to Bitcoin development. Decided to work with Python as seems to have the largest ecosystem when it comes to Bitcoin. I am a bit confused about the various different Python Bitcoin libraries though. From my research, here are the main 4:

https://github.com/petertodd/python-bitcoinlib

https://github.com/jgarzik/python-bitcoinrpc

https://github.com/1200wd/bitcoinlib

https://github.com/ofek/bit

Do all of these do roughly the same thing? In general I would like a high level library, to do basic things like send transactions (as a way to learn Bitcoin development, I want to build a demo exchange). The `bit` library seems to be the most high level. What would people recommend?

Thanks
1715293619
Hero Member
*
Offline Offline

Posts: 1715293619

View Profile Personal Message (Offline)

Ignore
1715293619
Reply with quote  #2

1715293619
Report to moderator
1715293619
Hero Member
*
Offline Offline

Posts: 1715293619

View Profile Personal Message (Offline)

Ignore
1715293619
Reply with quote  #2

1715293619
Report to moderator
"With e-currency based on cryptographic proof, without the need to trust a third party middleman, money can be secure and transactions effortless." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715293619
Hero Member
*
Offline Offline

Posts: 1715293619

View Profile Personal Message (Offline)

Ignore
1715293619
Reply with quote  #2

1715293619
Report to moderator
maikrothaman
Jr. Member
*
Offline Offline

Activity: 84
Merit: 1

PandoraCash.com anonymous money


View Profile WWW
December 25, 2022, 01:55:42 PM
 #2

I would choose this one if you are only interested in signatures and transactions: https://pypi.org/project/bitcoin/

Pandora Cash is the bitcoin killer
Untraceable, anonymous e-cash money
Private assets, unlinkable transactions, anonymous marketplace
OmegaStarScream
Staff
Legendary
*
Offline Offline

Activity: 3472
Merit: 6125



View Profile
December 25, 2022, 02:10:46 PM
Merited by hugeblack (4), Pmalek (2), ABCbits (1)
 #3

I would choose this one if you are only interested in signatures and transactions: https://pypi.org/project/bitcoin/

I don't think this is a good choice. The library's last release was in 2016, and it also has some disadvantages, especially for someone trying to build an exchange:

Code:
### Disadvantages:

Not a full node, has no idea what blocks are

Relies on centralized service (blockchain.info) for blockchain operations, although operations do have backups (eligius, blockr.io)

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
zander1983 (OP)
Member
**
Offline Offline

Activity: 65
Merit: 24


View Profile
December 25, 2022, 02:36:07 PM
 #4

I would choose this one if you are only interested in signatures and transactions: https://pypi.org/project/bitcoin/

I don't think this is a good choice. The library's last release was in 2016, and it also has some disadvantages, especially for someone trying to build an exchange:

Code:
### Disadvantages:

Not a full node, has no idea what blocks are

Relies on centralized service (blockchain.info) for blockchain operations, although operations do have backups (eligius, blockr.io)

Yeah, not having a release since 2016 is why i steered clear of this one. It also looks quite low-level. I want something high level so i can have a high level understanding of bitcoin development quickly, and then moving onto a high level understanding of lightning development. Im am not interested in going too low-level.
zander1983 (OP)
Member
**
Offline Offline

Activity: 65
Merit: 24


View Profile
December 26, 2022, 08:03:57 PM
 #5

What would people recommend?

For quick experiment/testing, i would recommend bit since it's easy to use. I also use bit for short example. Although for more serious usage, python-bitcoinlib is better choice since it's more up-to-date and it's created by one of Bitcoin Core developer.

Thanks, going with bit.
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5593


Self-proclaimed Genius


View Profile
December 27, 2022, 05:41:25 AM
 #6

Thanks, going with bit.
You can refer to this topic if you're going to include all address types to your deposit options since native SegWit address (bc1) is not documented in the library or their dev guide page (dev guide):
  • bitcointalk.org/index.php?topic=5431352.msg61498631#msg61498631

Reading it will save you time later.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
zander1983 (OP)
Member
**
Offline Offline

Activity: 65
Merit: 24


View Profile
December 27, 2022, 09:10:04 AM
 #7

Thanks, going with bit.
You can refer to this topic if you're going to include all address types to your deposit options since native SegWit address (bc1) is not documented in the library or their dev guide page (dev guide):
  • bitcointalk.org/index.php?topic=5431352.msg61498631#msg61498631

Reading it will save you time later.

Thank you, good info.
OmegaStarScream
Staff
Legendary
*
Offline Offline

Activity: 3472
Merit: 6125



View Profile
December 27, 2022, 02:36:36 PM
 #8

Someone just released[1][2] an open-source exchange (BTC <-> XMR), you may want to check it out[1]. It uses python-bitcoinrpc.

[1] https://github.com/jackmurray90/tradeapi
[2] https://bitcointalk.org/index.php?topic=5432028.0

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
mendace
Sr. Member
****
Offline Offline

Activity: 462
Merit: 616


Pizza Maker 2023 | Bitcoinbeer.events


View Profile WWW
December 29, 2022, 07:41:16 PM
 #9

Hi
Im new to Bitcoin development. Decided to work with Python as seems to have the largest ecosystem when it comes to Bitcoin. I am a bit confused about the various different Python Bitcoin libraries though. From my research, here are the main 4:

https://github.com/petertodd/python-bitcoinlib

https://github.com/jgarzik/python-bitcoinrpc

https://github.com/1200wd/bitcoinlib

https://github.com/ofek/bit

Do all of these do roughly the same thing? In general I would like a high level library, to do basic things like send transactions (as a way to learn Bitcoin development, I want to build a demo exchange). The `bit` library seems to be the most high level. What would people recommend?

Thanks




All of these libraries are Python libraries for working with Bitcoin, but they have different capabilities and focus on different aspects of Bitcoin development.

python-bitcoinlib is a comprehensive library for working with Bitcoin, providing support for parsing and serializing transactions and blocks, creating and signing transactions, and more. It also provides support for working with various network protocols, such as the Bitcoin P2P network and the Bitcoin JSON-RPC API.

python-bitcoinrpc is a library for accessing the Bitcoin JSON-RPC API, which allows you to interact with a Bitcoin daemon running on a local or remote host. It provides a high-level interface for querying and modifying the Bitcoin blockchain, as well as for managing the wallet.

bitcoinlib is another comprehensive Bitcoin library that provides support for parsing and serializing transactions and blocks, creating and signing transactions, and interacting with the Bitcoin P2P network and JSON-RPC API. It also includes support for working with testnets and regtest environments.

bit is a high-level Python library for working with Bitcoin. It provides a simple interface for creating, signing, and broadcasting transactions, as well as for querying the blockchain and managing addresses and wallets.

In general, if you're just starting out with Bitcoin development and want a high-level library for sending transactions and interacting with the blockchain, you might want to consider using bit. It provides a simple interface that is easy to use, and it should be sufficient for many basic Bitcoin development tasks. However, if you need more advanced functionality or want to work with lower-level details of the Bitcoin protocol, you might want to consider using one of the other libraries instead.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!