Skip to main content

A Python library for managing and organizing AI language model chains

Project description

API Reference

get_chain_info(chain_identifier: Union[int, str]) -> ChainInfo

Retrieves chain information based on the provided identifier.

  • chain_identifier: Can be an integer (chain ID) or a string (chain name or alias)
  • Returns a ChainInfo object containing chain details
  • Raises ChainNotFoundError if the chain is not found

ChainInfo

A Pydantic model representing chain information. Key attributes include:

  • name: Chain name
  • chainId: Chain ID
  • nativeCurrency: Native currency details (name, symbol, decimals)
  • wrapperNativeCurrency: Wrapper native currency details (name, symbol, decimals, contract)
  • rpc: List of RPC URLs
  • explorers: List of block explorers

Development

To set up the development environment:

  1. Clone the repository
  2. Install development dependencies: pip install -e ".[dev]"
  3. Run tests: pytest

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

This project uses data from the chainid.network project, which provides a comprehensive list of EVM-compatible chains.

Support

If you encounter any issues or have questions, please file an issue on the GitHub repository.

Changelog

See CHANGELOG.md for a detailed history of changes to this project.

Authors

  • gmatrix - Initial work and maintenance

Disclaimer

This package is provided as-is, and while we strive for accuracy, we cannot guarantee the correctness of all chain information. Users should verify critical information independently.

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

chain_index-0.1.9.tar.gz (139.4 kB view details)

Uploaded Source

Built Distribution

chain_index-0.1.9-py3-none-any.whl (142.9 kB view details)

Uploaded Python 3

File details

Details for the file chain_index-0.1.9.tar.gz.

File metadata

  • Download URL: chain_index-0.1.9.tar.gz
  • Upload date:
  • Size: 139.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for chain_index-0.1.9.tar.gz
Algorithm Hash digest
SHA256 e012cdf9ca6343bc7b4f59798ea79e614b40e5b0e15c05c8c0152afa501e4a02
MD5 9b196019e562803c47abc7cb09189b65
BLAKE2b-256 b5ff5759c14c7ef07ccf8d1048c120de69f7886c8ae240c9430b1625b29f6658

See more details on using hashes here.

File details

Details for the file chain_index-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: chain_index-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 142.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for chain_index-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 a630889955a48b0d091251995a5cd9d44f09bdd5a08bc2f841d4a66354620cfb
MD5 bb26003c6c10dd6bc028acb1b9498432
BLAKE2b-256 13afc4d2999d422bb4009d13a267187cefe2dd0596f39f43ddec1bfaa4e4c8e3

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