Skip to main content

Python Wrapper for the Adguard Home API

Project description

Python: AdGuard Home API Client

PyAdguard is an API wrapper inspired by the repository Proxmoxer:
https://github.com/proxmoxer/proxmoxer/tree/develop

About

A simple alternative API to interact with AdGuard Home.
Using the given AdGuardHome API description to get the needed URL paths:
https://github.com/AdguardTeam/AdGuardHome/blob/master/openapi/openapi.yaml

Installation

Normal installation:

pip install pyadguard

Local installation:

git clone https://github.com/ljelschen/pyadguard.git
cd pyadguard
pip install .

Usage

Modify the given sample.env and rename the file to .env

# %% imports
from pyadguard import AdguardAPI
from dotenv import dotenv_values

config = dotenv_values(".env")

# %% create an instance of AdguardAPI
adguard = AdguardAPI(
    host=config["ADGUARD_HOST"],
    username=config["ADGUARD_USERNAME"],
    password=config["ADGUARD_PASSWORD"],
    backend="https"
)
# %% read the stats of the AdGuard Home instance

# the url is /stats
stats = adguard.stats.get()
print(stats)

More examples are included in the examples folder.

Changelog & Releases

Details of changes and releases will be documented here.

Contributing

Guidelines for contributing will be provided here.

Setting Up the Development Environment

Instructions for setting up the development environment will be provided here.

Authors & Contributors

The original setup of this repository is by Lars Jelschen.

License

MIT License

Copyright (c) 2025 Lars Jelschen

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

pyadguard-0.2.5.post1.dev0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

pyAdguard-0.2.5.post1.dev0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file pyadguard-0.2.5.post1.dev0.tar.gz.

File metadata

  • Download URL: pyadguard-0.2.5.post1.dev0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for pyadguard-0.2.5.post1.dev0.tar.gz
Algorithm Hash digest
SHA256 d8e397297aee5ea5ed29f5e5d320cfb3546e48c2035d01f9679278a73620e86d
MD5 bc2deae0baeea11b67b5821c532e4d9d
BLAKE2b-256 e7980af5374055d495288d4f3e4e3f4b1ecc8e655b05d52ffd8218d56311ca2c

See more details on using hashes here.

File details

Details for the file pyAdguard-0.2.5.post1.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for pyAdguard-0.2.5.post1.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff8ba5b52982741c6b237fa6a4045ef8c715e565e53dd0e4c349cbd12837b5cb
MD5 852ec59666507c44d4b62b1932af72dd
BLAKE2b-256 259a07d64e8ac97abe8fcaf00b9e7a80ad67613c02ba34ac475797e8a31a5060

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