Skip to main content

Eduzz Miau Client for Python

Project description

eduzz-miau-client

Client Python para o serviço de autenticação Eduzz Miau.

Instalação

pip install eduzz-miau-client

Requisitos

  • Python >= 3.10

Uso

from eduzz_miau_client import MiauClient

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

token = client.get_token()

Ou usando context manager:

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

Exemplo

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: eduzz_miau_client-1.4.4.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.4.tar.gz
Algorithm Hash digest
SHA256 b9d026d3255019e17e9eba25f606510eca777c703d8a302821b349cc479403b7
MD5 8ef658d172c653e568ef6afe130b337f
BLAKE2b-256 b87ae2c7975542681d8b16c808a21f99fba5187d6849e767846604ede0ee5e7c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for eduzz_miau_client-1.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 883aa190d82312f94726c42bebe445d4c69437027862507bac7399829d23b718
MD5 bb7c19ab80683b4dc07a68bac44734ec
BLAKE2b-256 60c2e150bf0f4debfd06bf5b82ee0707a9c91280e99898d314f87ce11bf4f417

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