Python module implementing the Hydrus API
Project description
Hydrus API
Python module implementing the Hydrus API.
Requirements
- Python 3
- requests library (
pip install requests
)
Installation
$ pip install hydrus-api
If you want to use the package in your own (installable) Python project, specify
it in your setup.py
using: install_requires=['hydrus-api']
.
Description
It is highly recommended that you do not solely rely on the docstrings in this module to use the API, instead read the official documentation (latest here).
When instantiating Client
the acccess_key
is optional, allowing you to
initially manually request permissions using request_new_permissions()
.
Alternatively there is utils.request_api_key()
to make this easier. You can
instantiate a new Client
with the returned access key after that.
If the API version the module is developed against and the API version at the specified endpoint differ, you will be warned but not prevented from using any functionality -- this might have unintended consequences, be careful.
If something with the API goes wrong, a subclass of APIError
(MissingParameter
, InsufficientAccess
, ServerError
) or APIError
itself
will be raised with the requests.Response
object that caused the error. APIError
will only be raised directly, if the
returned status code is unrecognized.
The module provides Permission
, URLType
, ImportStatus
, TagAction
,
TagStatus
and PageType
enums for your convenience. Values in the response
data, represented by the enums, are automatically converted -- this makes them
more easily readable, the enum values can still be handled like regular
integers. Some utility functions are available in hydrus.utils
.
Check out examples/
for some example applications.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for hydrus_api-1.11.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08f51ecead7a39db55efe5b07dd0926396d737f763485a737f2e2a9d74311ea6 |
|
MD5 | e155620d026639e455c0e63351e39b86 |
|
BLAKE2b-256 | d51c9bdd26a3a03e76e96e424d011673abc4008cb9c72dd6e3a68bd1bf0aa094 |