Skip to main content

Python SDK for better-auth - generated by OpenAPI Generator

Project description

better-auth

GitHub Actions Workflow Status GitHub Release Date GitHub Release

Python Swagger openapi initiative

API Reference for your Better Auth Instance

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.1.0
  • Package version: 0.0.1-beta11
  • Generator version: 7.17.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install better-auth

(you may need to run pip with root permission: sudo pip install git+https://github.com/chasenlab/better-auth-python.git)

Then import the package:

import better_auth

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import better_auth

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import better_auth
from better_auth.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:3000/api/auth
# See configuration.py for a list of all supported configuration parameters.
configuration = better_auth.Configuration(
    host = "http://localhost:3000/api/auth" # Replace with your API server host
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = better_auth.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with better_auth.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = better_auth.AdminApi(api_client)
    admin_ban_user_request = better_auth.AdminBanUserRequest() # AdminBanUserRequest | 

    try:
        api_response = api_instance.admin_ban_user(admin_ban_user_request)
        print("The response of AdminApi->admin_ban_user:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AdminApi->admin_ban_user: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost:3000/api/auth

Class Method HTTP request Description
AdminApi admin_ban_user POST /admin/ban-user
AdminApi admin_create_user POST /admin/create-user
AdminApi admin_get_user GET /admin/get-user
AdminApi admin_has_permission POST /admin/has-permission
AdminApi admin_impersonate_user POST /admin/impersonate-user
AdminApi admin_list_user_sessions POST /admin/list-user-sessions
AdminApi admin_list_users GET /admin/list-users
AdminApi admin_remove_user POST /admin/remove-user
AdminApi admin_revoke_user_session POST /admin/revoke-user-session
AdminApi admin_revoke_user_sessions POST /admin/revoke-user-sessions
AdminApi admin_set_user_password POST /admin/set-user-password
AdminApi admin_set_user_role POST /admin/set-role
AdminApi admin_stop_impersonating POST /admin/stop-impersonating
AdminApi admin_unban_user POST /admin/unban-user
AdminApi admin_update_user POST /admin/update-user
ApiKeyApi api_key_create_post POST /api-key/create
ApiKeyApi api_key_delete_post POST /api-key/delete
ApiKeyApi api_key_get_get GET /api-key/get
ApiKeyApi api_key_list_get GET /api-key/list
ApiKeyApi api_key_update_post POST /api-key/update
DefaultApi account_info_get GET /account-info
DefaultApi change_email POST /change-email
DefaultApi change_password POST /change-password
DefaultApi delete_user POST /delete-user
DefaultApi delete_user_callback_get GET /delete-user/callback
DefaultApi error_get GET /error
DefaultApi forget_password POST /request-password-reset
DefaultApi get_access_token_post POST /get-access-token
DefaultApi get_session GET /get-session
DefaultApi link_social_account POST /link-social
DefaultApi list_user_accounts GET /list-accounts
DefaultApi list_user_sessions GET /list-sessions
DefaultApi ok_get GET /ok
DefaultApi refresh_token_post POST /refresh-token
DefaultApi reset_password POST /reset-password
DefaultApi reset_password_callback GET /reset-password/{token}
DefaultApi revoke_other_sessions_post POST /revoke-other-sessions
DefaultApi revoke_session_post POST /revoke-session
DefaultApi revoke_sessions_post POST /revoke-sessions
DefaultApi send_verification_email POST /send-verification-email
DefaultApi sign_in_email POST /sign-in/email
DefaultApi sign_out POST /sign-out
DefaultApi sign_up_with_email_and_password POST /sign-up/email
DefaultApi social_sign_in POST /sign-in/social
DefaultApi unlink_account_post POST /unlink-account
DefaultApi update_user POST /update-user
DefaultApi verify_email_get GET /verify-email
OneTapApi one_tap_callback_post POST /one-tap/callback
PasskeyApi generate_passkey_registration_options GET /passkey/generate-register-options
PasskeyApi passkey_delete_passkey_post POST /passkey/delete-passkey
PasskeyApi passkey_generate_authenticate_options GET /passkey/generate-authenticate-options
PasskeyApi passkey_list_user_passkeys_get GET /passkey/list-user-passkeys
PasskeyApi passkey_update_passkey_post POST /passkey/update-passkey
PasskeyApi passkey_verify_authentication POST /passkey/verify-authentication
PasskeyApi passkey_verify_registration POST /passkey/verify-registration
StripeApi handle_stripe_webhook POST /stripe/webhook
TwoFactorApi two_factor_disable_post POST /two-factor/disable
TwoFactorApi two_factor_enable_post POST /two-factor/enable
TwoFactorApi two_factor_generate_backup_codes_post POST /two-factor/generate-backup-codes
TwoFactorApi two_factor_get_totp_uri_post POST /two-factor/get-totp-uri
TwoFactorApi two_factor_send_otp_post POST /two-factor/send-otp
TwoFactorApi two_factor_verify_backup_code_post POST /two-factor/verify-backup-code
TwoFactorApi two_factor_verify_otp_post POST /two-factor/verify-otp
TwoFactorApi two_factor_verify_totp_post POST /two-factor/verify-totp

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

apiKeyCookie

  • Type: API key
  • API key parameter name: apiKeyCookie
  • Location:

bearerAuth

  • Type: Bearer authentication

Author

chasenspace@gmail.com

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

better_auth-0.0.1b11.tar.gz (84.3 kB view details)

Uploaded Source

Built Distribution

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

better_auth-0.0.1b11-py3-none-any.whl (195.4 kB view details)

Uploaded Python 3

File details

Details for the file better_auth-0.0.1b11.tar.gz.

File metadata

  • Download URL: better_auth-0.0.1b11.tar.gz
  • Upload date:
  • Size: 84.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.14 {"installer":{"name":"uv","version":"0.9.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for better_auth-0.0.1b11.tar.gz
Algorithm Hash digest
SHA256 b9df24d9fc4e8ae0111f61b2a4967225b0e4241eb8090c9b391c10400c77b380
MD5 9b9f8a288192cd9d1456eaf16a00d2c6
BLAKE2b-256 cdab6f527453f9cd3aee79b8f689aaefefabfdf3b3476a5b6aff52ed4a7101c7

See more details on using hashes here.

File details

Details for the file better_auth-0.0.1b11-py3-none-any.whl.

File metadata

  • Download URL: better_auth-0.0.1b11-py3-none-any.whl
  • Upload date:
  • Size: 195.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.14 {"installer":{"name":"uv","version":"0.9.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for better_auth-0.0.1b11-py3-none-any.whl
Algorithm Hash digest
SHA256 f5524dd87b18b00941f16bd439afe088b13fe9a69177f989900c73120cff5bff
MD5 92bf2674d5eabc8439ad9457324e1985
BLAKE2b-256 c9673088f44c8dd4d9712b38781f0fce046e94cceb40733ee52ad269161a54be

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