Skip to main content

Access Manager for accessing PDAP API

Project description

Access-Manager

This is a small package that makes it easy to access the PDAP API.

It is utilized in several other PDAP repositories

Usage

Utilizes an aiohttp client session, which can either be passed into the constructor, or automatically generated when using the AccessManager as a context manager.

from pdap_access_manager import AccessManager
from pdap_access_manager.models.request import RequestInfo
from pdap_access_manager.enums import DataSourcesNamespaces, RequestType

async def main():
    async with AccessManager("email", "password") as am:
        url = am.build_url(
            namespace=DataSourcesNamespaces.SEARCH,
            subdomains=['follow'],  
        )
        await am.make_request(
            RequestInfo(
                url=url,
                type_=RequestType.GET,
                headers=am.jwt_header()
            )
        )

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

pdap_access_manager-0.4.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

pdap_access_manager-0.4.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file pdap_access_manager-0.4.0.tar.gz.

File metadata

  • Download URL: pdap_access_manager-0.4.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pdap_access_manager-0.4.0.tar.gz
Algorithm Hash digest
SHA256 9009126e5ab2ac107dabc705b14c218f218b6c7a294c9c3ea777b80ea39030eb
MD5 0f1cb7eff1ba7fc3f1faf31e1ab9e269
BLAKE2b-256 449beed171dcba2e9c254f3be6aeecb4128caeb3028614f09f0ae1ea39354325

See more details on using hashes here.

Provenance

The following attestation bundles were made for pdap_access_manager-0.4.0.tar.gz:

Publisher: publish-to-pypi.yml on Police-Data-Accessibility-Project/Access-Manager

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

File details

Details for the file pdap_access_manager-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pdap_access_manager-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 46086d3eb65d7be98897d8983860f27b293996547ccb868721eba19af77ffeb2
MD5 f57f34462083faf8d1902042fe001960
BLAKE2b-256 bc566fd4f887ea32720ec6957a6b72bb13023bd4a158b1b32873be9eb9905e14

See more details on using hashes here.

Provenance

The following attestation bundles were made for pdap_access_manager-0.4.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on Police-Data-Accessibility-Project/Access-Manager

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