No project description provided
Project description
alchemy_sdk_py (Pre-Alpha)
An SDK to use the Alchemy API
Getting Started
Requirements
- Python 3.7 or higher
- You'll know you've done it right if you can run
python3 --version
in your terminal and see something likePython 3.10.6
- You'll know you've done it right if you can run
Installation
pip3 install alchemy_sdk_py
Quickstart
Get an API Key
After installing, you'll need to sign up for an API key and set it as an ALCHEMY_API_KEY
environment variable. You can place them in a .env
file if you like just please don't push the .env
file to GitHub.
.env
ALCHEMY_API_KEY="asdfasfsfasf
If you're unfamiliar with environment variables, you can use the API to set the key directly using the SDK - please don't do this in production code.
from alchemy_sdk_py import Alchemy
alchemy = Alchemy(api_key="asdfasfsfasf", network="eth_mainnet")
If you have your environment variable set, and you want to use eth mainnet, you can just do this:
from alchemy_sdk_py import Alchemy
alchemy = Alchemy()
You can also set the network ID using the chainId, or hex, and even update it later.
# For Goerli ETH
alchemy = Alchemy(network=5)
# For Polygon ("0x89" is hex for 137)
alchemy.set_network("0x89")
Useage
from alchemy_sdk_py import Alchemy
alchemy = Alchemy()
current_block = alchemy.get_current_block()
print(current_block)
Currently not implemented
-
batchRequests
-
web sockets
-
Notify API
-
Async support
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
alchemy_sdk_py-0.1.1.tar.gz
(10.0 kB
view hashes)
Built Distribution
Close
Hashes for alchemy_sdk_py-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 854a3f612734939e6ba9b684d3ca8fd81ceae6e0c968a1281521f8ff4fd1ed7f |
|
MD5 | 179dc244672d87f829f944287e3c4b88 |
|
BLAKE2b-256 | 5aadc0f5da036fe1a3592829a280da50c02ef2dddfffc2c4a5cc569ce96595bf |