Skip to main content

Forks Issues Contributors


Logo

EtherHound (API)

The API of EtherHound Core
Explore the docs »

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

EtherHound API is an asynchronous Python client library designed to interact seamlessly with the EtherHound Core API. It provides a simple and efficient interface for making HTTP requests to EtherHound-powered services, supporting modern Python features and type hints. Built on top of aiohttp and leveraging pydantic for data validation, this library enables developers to quickly integrate EtherHound API endpoints into their applications with minimal boilerplate.

Key features:

  • Asynchronous HTTP requests for high performance
  • Configurable host, port, and protocol settings
  • Designed for extensibility

(back to top)

Built With

  • Pydantic

(back to top)

Getting Started

Prerequisites

  • python >= 3.11
  • pydantic
  • aiohttp

Installation

Github installation:

  1. clone the repo
git clone https://github.com/EtherHounds/API.git
  1. cd into the repo
cd API
  1. build
pip install . -U
  1. done!
pip install etherhound-api

(back to top)

Usage

Subscribe to an Event

from houndapi import HoundAPI, LogsSubscription
import asyncio

async def main():
  client = HoundAPI(
    host="127.0.0.1", # local host
    port=8080
  )
  result = await client.subscribe(LogsSubscription(
    label="deposits",
    address="0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", # BSC-WBNB Contract
    topics=["0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c"] # The Deposit Event Hash
  ))
  print(f"Subscribed Successfully ✔️, Subscription ID: ({result.result[0]})")
  await client.close()

asyncio.run(main())

Poll Subscription Events

from houndapi import HoundAPI
import asyncio

async def main():
  client = HoundAPI(
    host="127.0.0.1", # local host
    port=8080
  )
  result = await client.poll(
    subscription_id="0xYourSubscriptionID",
    limit=10 # poll only first 10 events
  )
  for res in result:
    print(f"New Event From Subscription {res.label}")
    print(f"({res.result.address}) Has Deposited {(int(res.result.data, base=16))*10**-18:.8f} WBNB")
    print(f"(https://bscscan.com/tx/{res.result.transaction_hash})")
    print("-"*50)
  await client.close()

asyncio.run(main())

(back to top)

Roadmap

  • Examples
  • Better Documentation

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Top contributors:

contrib.rocks image

License

Distributed under the project_license. See LICENSE.txt for more information.

(back to top)

Contact

SpicyPenguin - @kerolis55463

Project Link: https://github.com/EtherHounds/API

(back to top)

Metadata

Release files for etherhound-api 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for etherhound-api 1.0.0
File Size Uploaded Provenance Actions
etherhound_api-1.0.0.tar.gz 9.7 kB Without provenance Details for etherhound_api-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for etherhound-api 1.0.0
File Interpreter ABI Platform Actions
etherhound_api-1.0.0-py3-none-any.whl Python 3 none any Details for etherhound_api-1.0.0-py3-none-any.whl

Total release size: 19.4 kB

Release files / etherhound_api-1.0.0.tar.gz

Download URL etherhound_api-1.0.0.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
85581cb4efaa449a18b64940e0f942f611ec3c2b11e01f2e08e7393c4e658665
BLAKE2b-256 checksum
How to use checksums
cde5e5907ace56eed75b7fe598b21825a0a5cbe886441cc35b11c8cdf0d88b99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release files / etherhound_api-1.0.0-py3-none-any.whl

Download URL etherhound_api-1.0.0-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b5ef8f5a57c4e23cd9c49b94ba3ed79b8c911a2b2b0c220b36cf676e562c9ebc
BLAKE2b-256 checksum
How to use checksums
5450313037020a02f2e36ee8f599525b99eaf39c307efec80272a8473ed554b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Security for etherhound-api 1.0.0

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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page