Skip to main content

Python Bindings for the Rated API

Project description

Rated Python SDK

Python bindings for the Rated API

CI/CD CircleCI
Package PyPI - Version PyPI - Downloads PyPI - Python Version
Meta Linting - Ruff Types - Mypy License - MIT

👋 Introduction

The Rated SDK (Software Development Kit) for Python, which allows Python developers to write software that makes use of the Rated dataset. You can find the latest, most up to date, documentation at our docs site.

The Rated SDK is maintained and published by Rated Labs.

We’ve curated many examples which will help you kickstart your integration but to get a full list of all available endpoints, you are recommended to check out our API Reference and Swagger.

🛟 Getting Help / Links

We use GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them.

Please use these community resources for getting help:

  • Ask a question on our feedback board
  • If it turns out that you may have found a bug, please open an issue

🚀 Getting started

Requirements

Installation

Install using pip:

pip install rated-python

Usage

Example: how to get a validator effectiveness rating by pubkey

from rated import Rated
from rated.ethereum import MAINNET

RATED_KEY = "ey..."
r = Rated(RATED_KEY)
eth = r.ethereum(network=MAINNET)
for eff in eth.validator.effectiveness("0x123456789...", from_day=873, size=1): 
    print(f"Day: {eff.day}, Eff: {eff.validator_effectiveness}")

>>> Day: 873, Eff: 98.82005899705014

Running tests

First install tox

pip install tox

Once tox has been installed you can run all tests:

tox

🤝 Contributing

We value feedback and contributions from our community. Whether it's a bug report, new feature, correction, or additional documentation, we welcome your issues and pull requests.

Please read through this CONTRIBUTING document before submitting any issues or pull requests to ensure we have all the necessary information to effectively respond to your contribution.

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

rated-python-0.0.1.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rated_python-0.0.1-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file rated-python-0.0.1.tar.gz.

File metadata

  • Download URL: rated-python-0.0.1.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.6

File hashes

Hashes for rated-python-0.0.1.tar.gz
Algorithm Hash digest
SHA256 628ee1a19634dfdb7140b60acac6a046640176926be262971788a155f04f0687
MD5 dfc37b26ea7918b813a0b7509674d83b
BLAKE2b-256 49000c7210709358e9a404ad9cca661293c3859dda0555147367f8eefd30ea72

See more details on using hashes here.

File details

Details for the file rated_python-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: rated_python-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.6

File hashes

Hashes for rated_python-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a71380463a2175f76dae24db84dfc5fa872db8591559c4ee16adbb00bb0ab2a2
MD5 ca8721b0d69f4e4f1d9e0c73237bbdfe
BLAKE2b-256 60d0139024d44c44dda3210031a7b2656c99027a952935915f5a5f1b65769e46

See more details on using hashes here.

Supported by

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