pydefillama: a DefiLlama Python client
An unofficial DeFiLlama wrapper built for data science workflows.
For detailed instructions on the endpoints, refer to the API docs.
Installation
pip install pydefillama
Usage
import pydefillama as llama
# fetch all protocols
protocols = llama.fetch_all_protocols()
# fetch TVL for a protocol
llama.fetch_protocol_tvl(protocols[0]["slug"])
# fetch all chains
chains = llama.fetch_all_chains()
# fetch TVL for a chain
llama.fetch_chain_tvl(chains["name"])
Full list of supported functions here.
Run Tests
python -m unittest discover
Developing Locally
# install module without pip
python setup.py develop
# run shell to play around
ipython
# import and use module in python shell
import pydefillama as llama
...
Contributing
If you would like to contribute to this project, please open an issue or submit a PR. While we are open to all contributions, we would like to keep this project focused on data science workflows, which is why functions often return a pandas dataframe. If you would like to use this module for other purposes, please consider forking this repo.
Maintainers
To push to PyPi, follow the following steps:
- Update version in
setup.py - Push to main branch
- Run
./updatepip.sh
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgements
We are thankful for the DefiLlama team for providing this open API. If you would like to support them, consider donating to them here.
Metadata
Release files for pydefillama 1.0.10
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 |
|---|---|---|---|---|
| pydefillama-1.0.10.tar.gz | 5.1 kB | Without provenance | Details for pydefillama-1.0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pydefillama-1.0.10-py3-none-any.whl | Python 3 | none | any | Details for pydefillama-1.0.10-py3-none-any.whl |
Total release size: 11.1 kB
Release files / pydefillama-1.0.10.tar.gz
| Download URL | pydefillama-1.0.10.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
58d2912f46c9766d693b0a43c45081456401d43c2a8f782b0dbae60a2f29567e
|
|
BLAKE2b-256 checksum How to use checksums |
4578457cb51950e8ee4c1c1a0e85d8d32a72f540d31ca4458c86ff31fbcb0b6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Release files / pydefillama-1.0.10-py3-none-any.whl
| Download URL | pydefillama-1.0.10-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
83218dd3ffa14add7624f422e6322b8b4e96f428791304b7efb6fc751b06f74c
|
|
BLAKE2b-256 checksum How to use checksums |
58133c405cfa018c96c9b115776045bbda5e97f8e3c3db7c9316c28300513d12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Security for pydefillama 1.0.10
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.