Skip to main content

Ocickle Auth Python SDK

A small, dependency-light Python client for the Ocickle Auth API (https://api.auth.ocickle.com). Covers registration, login, email verification, account management, and session management

Install

pip install -e .

Usage

from ocickle_auth_python import OcickleAuthClient, Config
from ocickle_auth_python.exceptions import AuthenticationError

client = OcickleAuthClient(Config(base_url="https://api.auth.ocickle.com"))

# Register + activate
client.register(name="John Doe", email="john@example.com", password="Password123!")
client.verify_account(email="john@example.com", code="123456")  # logs in on success

# Or log in directly (identifier = username, phone, or email)
try:
    result = client.login(identifier="john@example.com", password="Password123!")
except AuthenticationError as exc:
    print(exc.status_code, exc.message)

# access_token is cached on the client after login/verify_account/refresh,
# so most calls don't need it passed explicitly:
profile = client.get_profile()

# refresh_token/device_id cookies are held in the client's session, so
# refresh() just works:
client.refresh()

client.logout()

Notes

  • All responses are unwrapped from the API's {success, message, data} envelope — methods return data directly.
  • Errors raise AuthenticationError (401/403), ValidationError (400/409/422), NotFoundError (404), or APIError (other non-2xx), all subclasses of OcickleError with .message, .status_code, and .errors.
  • refresh() relies on the session's cookie jar rather than taking a refresh token argument, since the API only ever hands the refresh token back as a Secure, HttpOnly cookie.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ocickle_auth_python-0.1.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

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

ocickle_auth_python-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file ocickle_auth_python-0.1.0.tar.gz.

File metadata

  • Download URL: ocickle_auth_python-0.1.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.3

File hashes

Hashes for ocickle_auth_python-0.1.0.tar.gz
Algorithm Hash digest
SHA256 382ad88d697d6f7df39b9838f863fea7719dfb6d68069a19d641473324f1ae59
MD5 43b631a50338760dd0376ee6345c76b5
BLAKE2b-256 9fc16ce36b88b6ba76f2cbf82784d3d76f09abbf32169777851f143043b0b509

See more details on using hashes here.

File details

Details for the file ocickle_auth_python-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ocickle_auth_python-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7109cde3b22da466e7bc8efad80f0ec833ed77f345176dfa66e7774a0042ab1a
MD5 e10b9bc4bde1668a7b61a1dfd49cb3a8
BLAKE2b-256 08a4dd914300099d9dc567333dc74fdc5c47f2d4075d46e18d4ede9681edc0e7

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 Sentry Error logging StatusPage Status page