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.2.tar.gz (5.7 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.2-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pdap_access_manager-0.4.2.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.6 Windows/11

File hashes

Hashes for pdap_access_manager-0.4.2.tar.gz
Algorithm Hash digest
SHA256 37a958689daf6a285c4ac989108b8e3c7c7f226032f6e684d1878648e86bd9c2
MD5 1afde20ae5cdb87980ff303fd1129e6f
BLAKE2b-256 cd48c5567f65038c4c914cfc85a2772f66e5fae9c97076de4b12905266236650

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pdap_access_manager-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 97d74575a4949b1aa6cd3265e4dd74a0014e451b95d0619c327e43b123bacf8b
MD5 71bda895d0431c4150858de01c4aaa06
BLAKE2b-256 cfb0ebca0ee05b13a47ce094c3a6a4fc5e0b148baa6ee89519722a46bcc27db9

See more details on using hashes here.

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