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 RequestType

async def main():
    auth_info = AuthInfo(
        email="email",
        password="password"
    )
    async with AccessManagerAsync(auth_info) as am:
        url = f"{am.data_sources_url}/search/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.4.tar.gz (6.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.4.4-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pdap_access_manager-0.4.4.tar.gz
Algorithm Hash digest
SHA256 b824cf8014c6eb6ca29e797788f26d44d96ca0bc033309d5af2d878bb913d08f
MD5 12ec510f4db08de03f19b97a33e523f1
BLAKE2b-256 7560743b8d5e2478e911c421f5cc4a8dec0f051542c12958776a4a96fef73ee5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pdap_access_manager-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b65203daec4a5bffe0be5d3577b6e515c644b3a9ca583c39f912f32e0bca11ef
MD5 222d7259545f98173391f3176e35af2c
BLAKE2b-256 bd484fe13370886bcc2ac8b6e35d508c733a6eae05e2fe684e6aacc26d7ddea2

See more details on using hashes here.

Provenance

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