Skip to main content

Access Manager for accessing PDAP API

Project description

from pdap_access_manager.models.auth import AuthInfo

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.access_manager.async_ import AccessManagerAsync
from pdap_access_manager.models.request import RequestInfo
from pdap_access_manager.models.auth import AuthInfo
from pdap_access_manager.enums import DataSourcesNamespaces, RequestType

async def main():
    auth_info = AuthInfo(
        email="email",
        password="password"
    )
    async with AccessManagerAsync(auth_info) 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.1.tar.gz (6.4 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.1-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pdap_access_manager-0.4.1.tar.gz
  • Upload date:
  • Size: 6.4 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.1.tar.gz
Algorithm Hash digest
SHA256 8d4d609c3fdd4722d3da5d881d334bef4711628178ffac72f746b94284995d89
MD5 0993b5455dbf559f14a55b3c245ee5fd
BLAKE2b-256 9b68f4b9f292887b444b02286cefc7ceeb1b4028e97d7ad45500bde0b0b7c156

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pdap_access_manager-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 18b7e8f026f73181a9c37cfd4379e3c33712de081f945f201497149a99fbe147
MD5 612d09c8f6753c81cfb2b10d51c341f0
BLAKE2b-256 e45626d55e00d486ab24b613be8eb88324c855b33aca865b6e07fcd11424e4fb

See more details on using hashes here.

Provenance

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