This release is a pre-release and may not be stable for production use.
better-auth
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-beta13
- 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
- Account
- AccountInfoGet200Response
- AccountInfoGet200ResponseUser
- AdminBanUserRequest
- AdminCreateUserRequest
- AdminHasPermission200Response
- AdminHasPermissionRequest
- AdminListUserSessions200Response
- AdminListUserSessionsRequest
- AdminListUsers200Response
- AdminRevokeUserSessionRequest
- AdminSetUserPasswordRequest
- AdminSetUserRoleRequest
- AdminUpdateUserRequest
- ApiKeyCreatePost200Response
- ApiKeyCreatePostRequest
- ApiKeyDeletePost200Response
- ApiKeyDeletePostRequest
- ApiKeyGetGet200Response
- ApiKeyListGet200ResponseInner
- ApiKeyUpdatePostRequest
- Apikey
- ChangeEmail200Response
- ChangeEmailRequest
- ChangePassword200Response
- ChangePasswordRequest
- DeleteUser200Response
- DeleteUserCallbackGet200Response
- DeleteUserRequest
- ForgetPassword200Response
- ForgetPasswordRequest
- GeneratePasskeyRegistrationOptions200Response
- GeneratePasskeyRegistrationOptions200ResponseAuthenticatorSelection
- GeneratePasskeyRegistrationOptions200ResponseExcludeCredentialsInner
- GeneratePasskeyRegistrationOptions200ResponsePubKeyCredParamsInner
- GeneratePasskeyRegistrationOptions200ResponseRp
- GeneratePasskeyRegistrationOptions200ResponseUser
- GetSession200Response
- LinkSocialAccount200Response
- LinkSocialAccountRequest
- LinkSocialAccountRequestIdToken
- ListUserAccounts200ResponseInner
- OkGet200Response
- OneTapCallbackPost200Response
- OneTapCallbackPostRequest
- Passkey
- PasskeyDeletePasskeyPost200Response
- PasskeyDeletePasskeyPostRequest
- PasskeyGenerateAuthenticateOptions200Response
- PasskeyUpdatePasskeyPost200Response
- PasskeyUpdatePasskeyPostRequest
- PasskeyVerifyAuthenticationRequest
- PasskeyVerifyRegistrationRequest
- RefreshTokenPost200Response
- RefreshTokenPostRequest
- ResetPassword200Response
- ResetPasswordCallback200Response
- ResetPasswordRequest
- RevokeOtherSessionsPost200Response
- RevokeSessionPost200Response
- RevokeSessionPostRequest
- RevokeSessionsPost200Response
- SendVerificationEmail200Response
- SendVerificationEmail400Response
- SendVerificationEmailRequest
- Session
- SignInEmail200Response
- SignInEmailRequest
- SignOut200Response
- SignUpWithEmailAndPassword200Response
- SignUpWithEmailAndPassword200ResponseUser
- SignUpWithEmailAndPasswordRequest
- SocialSignIn200Response
- SocialSignIn400Response
- SocialSignIn403Response
- SocialSignInRequest
- SocialSignInRequestIdToken
- TwoFactor
- TwoFactorEnablePost200Response
- TwoFactorEnablePostRequest
- TwoFactorGenerateBackupCodesPost200Response
- TwoFactorGenerateBackupCodesPostRequest
- TwoFactorGetTotpUriPost200Response
- TwoFactorGetTotpUriPostRequest
- TwoFactorVerifyBackupCodePost200Response
- TwoFactorVerifyBackupCodePost200ResponseSession
- TwoFactorVerifyBackupCodePost200ResponseUser
- TwoFactorVerifyBackupCodePostRequest
- TwoFactorVerifyOtpPost200Response
- TwoFactorVerifyOtpPost200ResponseUser
- TwoFactorVerifyOtpPostRequest
- TwoFactorVerifyTotpPostRequest
- UnlinkAccountPostRequest
- UpdateUser200Response
- UpdateUserRequest
- User
- Verification
- VerifyEmailGet200Response
Documentation For Authorization
Authentication schemes defined for the API:
apiKeyCookie
- Type: API key
- API key parameter name: apiKeyCookie
- Location:
bearerAuth
- Type: Bearer authentication
Author
Metadata
Release files for better-auth 0.0.1b13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| better_auth-0.0.1b13.tar.gz | 84.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| better_auth-0.0.1b13-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 279.4 kB
Release files / better_auth-0.0.1b13.tar.gz
| Download URL | better_auth-0.0.1b13.tar.gz |
|---|---|
| Size | 84.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3bb3b26ac8589101d801c309494dd44e3e9a0b4039bf52941a6fbe20a9f5f7fc
|
|
BLAKE2b-256 checksum How to use checksums |
e251c4827d7efa61e260dad3d3a55d4e9e8edefeed5857f3ca43f7a9243ef399
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","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}
|
Release files / better_auth-0.0.1b13-py3-none-any.whl
| Download URL | better_auth-0.0.1b13-py3-none-any.whl |
|---|---|
| Size | 195.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f3ba6df2b163dce52957e4d8fcaa9c881aaa5455e948855e1ab3b24aa6531e1c
|
|
BLAKE2b-256 checksum How to use checksums |
91881dec60952d3302a1c0fd7568149e923dae0eb470e2086b5a3a2286fa8e50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","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}
|