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.1.tar.gz (10.0 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.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hole-0.9.1.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for hole-0.9.1.tar.gz
Algorithm Hash digest
SHA256 373f88e000512912ab620575f7c446801408dca2951bb1bae6c0276e054f7709
MD5 514f7c425cb0c139ab8c8133673a4b28
BLAKE2b-256 bff88c9a99638cefecbd239655831548965f10862d25d1ab9f3383893083662c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hole-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for hole-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e686baa48b8952c11a937d6a504520d15f483e913467560d62e9aa64c3e6745e
MD5 90ab904560c2656e0bb65d8e3faec83a
BLAKE2b-256 b4d60f68f4cf70301567d28b2fc757e200ef522572358bdaa0d2366b4a3243e2

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