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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pdap_access_manager-0.3.13.tar.gz
  • Upload date:
  • Size: 5.1 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.13.tar.gz
Algorithm Hash digest
SHA256 1aad3dbe06b78146a04c7e5bf92a3a2ece0761b6417360f613084859b3c69475
MD5 9f07537df9ee5236545a49c2c0936e2c
BLAKE2b-256 f1959e81fa0a3090002666129cc9edb95c22ce64a1f4954263e728ea21d8d7fd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pdap_access_manager-0.3.13-py3-none-any.whl
Algorithm Hash digest
SHA256 023244796070c54e5af7e09b8029b7fbef2955a6f9f7645ee2cb213e9e8273e5
MD5 340ca770611ba92f7745345d2b37e309
BLAKE2b-256 faa9b43a5c5d17905dc555951764839d13f2ec5a79e687593850557d9fa8a68c

See more details on using hashes here.

Provenance

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