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.3rc14.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.3rc14-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file eduzz_miau_client-1.4.3rc14.tar.gz.

File metadata

  • Download URL: eduzz_miau_client-1.4.3rc14.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.3rc14.tar.gz
Algorithm Hash digest
SHA256 43dad3061b06c07162cca386727b1e21d491e51306346425d6018b040bf39719
MD5 fd6c70591400b6ea5c6487522a3382db
BLAKE2b-256 66afd1f73a5446e971f0057c30dc98a06f7105dd4c51329493b69eea86552162

See more details on using hashes here.

File details

Details for the file eduzz_miau_client-1.4.3rc14-py3-none-any.whl.

File metadata

File hashes

Hashes for eduzz_miau_client-1.4.3rc14-py3-none-any.whl
Algorithm Hash digest
SHA256 e5cd49d59d215ad381238c9c0927145daf8a5d0811b0747f0aa8e62e5fdbd060
MD5 a5b6499b603a6edd535a863f887fb1c9
BLAKE2b-256 43c2dea5bd63242fbf378c3bed719d4495425a6f78cee7e487e7d7e285d7d938

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