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
Built Distribution
File details
Details for the file alchemy_sdk_py-0.1.1.tar.gz
.
File metadata
- Download URL: alchemy_sdk_py-0.1.1.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5dae7495e204677253ff14f7ec101253768ce97e3ee02b0b25de2b871506b4d |
|
MD5 | b3a30f2ca375c2378318cc63c1eeec5c |
|
BLAKE2b-256 | d300573f46951fc4889701dbdfbb4f3b23ec508b94cb3bec543598f434ce54ab |
File details
Details for the file alchemy_sdk_py-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: alchemy_sdk_py-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 854a3f612734939e6ba9b684d3ca8fd81ceae6e0c968a1281521f8ff4fd1ed7f |
|
MD5 | 179dc244672d87f829f944287e3c4b88 |
|
BLAKE2b-256 | 5aadc0f5da036fe1a3592829a280da50c02ef2dddfffc2c4a5cc569ce96595bf |