Skip to main content

Python SDK for Geodefi Ecosystem

Project description

geodefi

geodefi is a Python library for interacting with geode.fi smart contract infrastructure.

geode.fi an open source Decentralized Infrastructure Provider aiming to create a secure closed-environment for the wider Decentralized Finance landscape. Currently providing a set of smart contracts which allows anyone to create their own Staking Pool on Ethereum. Soon, much more.

Built on top of web3.py Geodefi offers a comprehensive set of functions and utilities that simplify the process of interacting with the protocol's smart contract infrastructure.

Whether you're looking to query contract data or execute transactions, geodefi Python SDK has you covered! With a user-friendly and highly efficient interface, this SDK also provides cool features such as built-in cache, easy wallet management etc.

Features

  • Supports Ethereum Holesky testnet (as of v2.1.0) where The Protocol is deployed.
  • Provides a simple and intuitive API for managing validators, operators, pools, tokens, and other smart contracts/packages.
  • Dynamically adapts to the contract upgrades.
  • Mostly chain agnostic. However, might differ according to the unique PoS implementations.
  • Compatible from Python 3.7 to Python 3.10.

Installation

pip install geodefi

Documentation

Detailed documentation for this project is available on Geodefi SDK Read The Docs.

Sphinx

If your feature needs to have additional section in Read The Docs. Please check the docs in your local computer first.

built docs page is located in docs/_build/html/index.html.

You will need a sphinx server to render rst files:

Build

sphinx-build docs docs/_build/html

Auto-build

sphinx-autobuild docs docs/_build/html

Contributing

We welcome contributions from the community! To contribute to this project, please follow these steps:

  1. Fork the Repository: Click the "Fork" button at the top right corner of this repository to create your own copy.

  2. Clone the Repository: Clone the forked repository to your local machine using the following command:

    git clone https://github.com/<your_user_name>/geode-py.git
    
  3. Build from source: Take a look at the Build section

  4. Create a Branch: Create a new branch for your contribution:

    git checkout -b feature/your-feature-name
    
  5. Stage Changes: Stage your changes to be commited

    git add <your-modified-files>
    
  6. Commit Changes: Commit your changes with a descriptive commit message:

    git commit -m "Add feature: your feature description"
    
  7. Push Changes: Push your changes to your forked repository:

    git push origin feature/your-feature-name
    
  8. Create a Pull Request: Go to the original repository on GitHub and click on the "Pull Request" button. Fill out the necessary information and submit the pull request. Your pull request will be reviewed by the maintainers. Be ready to respond to any feedback or changes requested. You might need to make additional commits based on the feedback.

Building

We do not recommend using pip and your local python installation.

Use pipx to manage your local packages, which in this case will be used to install pyenv.

Use pyenv to manage your python version.

Use poetry for dependency management and packaging.

Create virtual env

Simply do:

poetry shell

This will create and activate a virtual environment.

If you want to set the python version from start you can also do:

poetry env use <python_version/3.9/3.9.19/etc>

This will output:

Using virtualenv: <path_to_venv> copy <path_to_venv> and use it above to activate

source <path_to_venv>/bin/activate

Install deps

Install project dependencies with:

poetry install

Release

Old method:

  • Use main branch for releases.
  • test with VERSION=1.0.0 python -m build if you want, then:
    git tag -a "v0.0.1-beta" -m "beta version testing"
    git push --tags

New Method:

poetry publish --build

License

geodefi python sdk is licensed under MIT.

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

geodefi-3.0.1.tar.gz (245.4 kB view details)

Uploaded Source

Built Distribution

geodefi-3.0.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file geodefi-3.0.1.tar.gz.

File metadata

  • Download URL: geodefi-3.0.1.tar.gz
  • Upload date:
  • Size: 245.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/23.5.0

File hashes

Hashes for geodefi-3.0.1.tar.gz
Algorithm Hash digest
SHA256 8a1f2a603430e36c3b4f021cdf30b3321dbb29a9a32bef857bd54f74dcb2d7b9
MD5 9106fcf5fa460a4ee9aa62a7d4b87df0
BLAKE2b-256 87f8df45e5be2af5bfdd736825c9caa1b2df9a5a60fbdf761d9921841ffe5aac

See more details on using hashes here.

File details

Details for the file geodefi-3.0.1-py3-none-any.whl.

File metadata

  • Download URL: geodefi-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/23.5.0

File hashes

Hashes for geodefi-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9cf12b2c50dd732b9e65a89471ec9480a508326887f32fd44a8c56823382f44c
MD5 fec5c71290f2ffed78d4c5926080a391
BLAKE2b-256 989f7ab0623a5aa2fb7995d355f667bf09e2a8e021f7f0d01df5a5f12fd5b4a6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page