Introduction
Python client for Midgard API
THORChain has several APIs - Midgard, THORNode, Cosmos RPC, CometBFT RPC. This python client focuses on interactions with Midgard API.
Built for Midgard Public API version 2.32.8.
Warning
I needed this to use only one endpoint, so first release will be very much useless for anyone. I will continue working on this and covering all API endpoints in the future when I have more free time.
Progress
Below is the implementation status of the major sections of Midgard API in this Python client:
| Section | Implemented | Notes |
|---|---|---|
| Health Info | ✅ | |
| Pools List | ✅ |
If you notice any discrepancy or want a section prioritized, please open an issue or PR.
Installation
Normal installation
pip install midgard-py
Development installation
git clone https://github.com/jpleorx/midgard-py.git
cd midgard-py
pip install --editable .
Usage
from midgard_py import MidgardAPI
api = MidgardAPI()
# Check that it's online
health = api.health()
# Get pools
pools = api.pools()
Links
In case you’d like to check my other work or contact me:
- E-mail: leo.ertuna@gmail.com
- GitHub
- PyPI
- DockerHub
Metadata
Release files for midgard-py 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| midgard-py-0.0.1.tar.gz | 9.3 kB | Without provenance | Details for midgard-py-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| midgard_py-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for midgard_py-0.0.1-py3-none-any.whl |
Total release size: 20.2 kB
Release files / midgard-py-0.0.1.tar.gz
| Download URL | midgard-py-0.0.1.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60e1088255b7a88bdc1a6ff9acb0fab34a7b9acf6617e46eda72dd00b70fbda4
|
|
BLAKE2b-256 checksum How to use checksums |
067e1dd9f5543a91184490aa5cfd30a68df1624e69f63dd52d3f1997299ed762
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.6
|
Release files / midgard_py-0.0.1-py3-none-any.whl
| Download URL | midgard_py-0.0.1-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fcc6520c93fc00a6da5a6a0f5543c893ba37b1b23e7486bb798ba57bf1239e40
|
|
BLAKE2b-256 checksum How to use checksums |
734db605bb932c94440384c2715564959227a355da553560dc810c23f3a632a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.6
|
Security for midgard-py 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.