Skip to main content

Eduzz Miau Client for Python

Project description

eduzz-miau-client

Python client for the Eduzz Miau authentication service.

Installation

pip install eduzz-miau-client

Requirements

  • Python >= 3.10

Usage

from eduzz_miau_client import MiauClient

client = MiauClient(
    api_url="https://your-miau-api-url",
    app_secret="your-app-secret",
)

token = client.get_token()

Or using a context manager:

with MiauClient(api_url="https://your-miau-api-url", app_secret="your-app-secret") as client:
    token = client.get_token()

Example

import httpx
import json
import os
from eduzz_miau_client import MiauClient

MIAU_API_URL = os.environ.get('MIAU_API_URL')
MIAU_APP_SECRET = os.environ.get('MIAU_APP_SECRET', '')
YOUR_API_URL = os.environ.get('YOUR_API_URL', 'https://your-api.example.com')

client = MiauClient(api_url=MIAU_API_URL, app_secret=MIAU_APP_SECRET)
token = client.get_token()

http = httpx.Client()
response = http.get(f'{YOUR_API_URL}/your/endpoint', headers={'Authorization': f'Bearer {token}'})
print(json.dumps(response.json(), indent=2, ensure_ascii=False))

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

eduzz_miau_client-1.4.4rc15.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eduzz_miau_client-1.4.4rc15-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file eduzz_miau_client-1.4.4rc15.tar.gz.

File metadata

  • Download URL: eduzz_miau_client-1.4.4rc15.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for eduzz_miau_client-1.4.4rc15.tar.gz
Algorithm Hash digest
SHA256 81761d2868a8b396c27803b2e18f90693478eb8fac5cf2777e2739a67d5f1620
MD5 74354c783cf201d5a4702fa93a160253
BLAKE2b-256 d8ecb8cf040dc3aadf8d54b1aa97c6a9d8def21e9af13fdb39d9e51a20ac7fad

See more details on using hashes here.

File details

Details for the file eduzz_miau_client-1.4.4rc15-py3-none-any.whl.

File metadata

File hashes

Hashes for eduzz_miau_client-1.4.4rc15-py3-none-any.whl
Algorithm Hash digest
SHA256 1a9c0b4467c95c648e950d5ba248a775d06a8fdcf6d8aafe7014caee7b69fad5
MD5 33e1777d4f5162fc22915041f46b897e
BLAKE2b-256 f078238c9d43a74e2e524e2053eb79d856d6c548dc1f9b044c0d1cbec39b1cb1

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