Skip to main content

Python API for interacting with *hole.

Project description

Python API for interacting with a xyz-hole instance. You know the thing that is blocking Ads by manipulating your DNS requests and run on your single board computer or on other hardware with different operating systems.

This module supports both v5 and v6 versions of the API through a unified interface. Simply specify the version when creating your client:

from hole import Hole

# For v6 (default)
client = Hole("YOUR_API_TOKEN")

# For v5
client_v5 = Hole("YOUR_API_TOKEN", version=5)

This module is consuming the details provided by the endpoint api.php and other API endpoints available in v5 and v6.

If you wonder why the weird name and that the usage of xzy-hole instead of the real name, please contact the trademark holder. They were unhappy with original name of the module and came up with very funny ideas which were not feasible or match the existing naming standards. Also, it should remind us that a community is a vital part of every Open Source project.

This module is not supported or endorsed by that particular trademark holder. The development happens independently, they are not providing resources and the module may no longer work if they breaking their API endpoint.

Installation

The module is available from the Python Package Index.

$ pip3 install hole

On a Fedora-based system.

$ sudo dnf -y install python-hole

For Nix or NixOS is a pre-packed module available. The latest release is usually present in the unstable channel.

$ nix-env -iA nixos.python3Packages.hole

Usage

The files examplev5.py and examplev6.py contains examples about how to use this module.

Roadmap

There are more features on the roadmap but there is no ETA because I prefer to support Open Source projects where third party contributions are appreciated.

License

python-hole is licensed under MIT, for more details check LICENSE.

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

hole-0.9.2.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

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

hole-0.9.2-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file hole-0.9.2.tar.gz.

File metadata

  • Download URL: hole-0.9.2.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hole-0.9.2.tar.gz
Algorithm Hash digest
SHA256 6d433ac3f4078bb9904b4112aa2233c2848935f7eeed23d3d590d0cdae0a5eb2
MD5 84f38ac835a6429e47088b97e9ff23d6
BLAKE2b-256 822c085ea627c679c3293982c81b0236c12f7d4ef77d673bf791a1d178c69d30

See more details on using hashes here.

Provenance

The following attestation bundles were made for hole-0.9.2.tar.gz:

Publisher: publish-to-pypi.yml on home-assistant-ecosystem/python-hole

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hole-0.9.2-py3-none-any.whl.

File metadata

  • Download URL: hole-0.9.2-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hole-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6a6e3728affe6183228c41ef2b9dc5b13b10456f57a9b1b484ba6be806a66cb8
MD5 d67e30a0ec1b9dec154056436c2f9cdb
BLAKE2b-256 cd9b5a04a1641de0b8afdd81d6272c5e55b55bd406dcaee7dc50cf791ad6f4c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for hole-0.9.2-py3-none-any.whl:

Publisher: publish-to-pypi.yml on home-assistant-ecosystem/python-hole

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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