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.3.12.tar.gz (5.0 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.3.12-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pdap_access_manager-0.3.12.tar.gz
  • Upload date:
  • Size: 5.0 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.3.12.tar.gz
Algorithm Hash digest
SHA256 be83adf20b3fa7de1dc8d785e3937923ac3b0ae6d1dfbdcfcc50d380fe30d21a
MD5 fe1eb70191bc57396b641247019c8d97
BLAKE2b-256 1e45ac2999b4c8700e802f751dee9a9f6179f2ad2464c3347a2238d5f43bd1f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pdap_access_manager-0.3.12.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.3.12-py3-none-any.whl.

File metadata

File hashes

Hashes for pdap_access_manager-0.3.12-py3-none-any.whl
Algorithm Hash digest
SHA256 c1c179c8a180b835a4d949a5ded4b8e61c85105569cf80eb5fc2a0875c153223
MD5 e2932c0654d4266b669dc7e641fabb81
BLAKE2b-256 7aeb413fbc8486f3ef46cf8abb01833c1343d5f862949d48a4f114cda790bbca

See more details on using hashes here.

Provenance

The following attestation bundles were made for pdap_access_manager-0.3.12-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