ProtoBase Client
ProtoBase Client is a simple and efficient Python package designed to interact with the ProtoBase authentication API. It provides easy-to-use functions for user sign-up and sign-in via email or username, abstracting away the complexity of API calls and streamlining the authentication process in Python applications.
Features
- Email-based authentication: Easily sign up and sign in users using their email and password.
- Username-based authentication: Allow users to sign up and sign in using a username and password.
- Simple integration: Quickly integrate authentication features into any Python application with minimal code.
- Seamless API interaction: The package handles all the HTTP request/response management, making authentication tasks straightforward.
Api Token
Get Your Api-Token from the Official Website
Installation
To install the package, simply use pip:
pip install protobase-client
Usage
Here’s how you can use the ProtoBase Client in your Python application:
1. Import the package
from protobase_client import ProtoBaseClient
2. Create an instance of the client
client = ProtoBaseClient()
3. Sign up with email
To sign up a user with their email and password:
signup_response = client.signup_email("username", "password", "email@example.com", "api_token")
print(signup_response)
4. Sign in with email
To sign in a user with their email and password:
signin_response = client.signin_email("username", "password", "email@example.com", "api_token")
print(signin_response)
5. Sign up with username
To sign up a user with just a username and password:
signup_response = client.signup_username("username", "password", "api_token")
print(signup_response)
6. Sign in with username
To sign in a user with their username and password:
signin_response = client.signin_username("username", "password", "api_token")
print(signin_response)
Example
from protobase_client import ProtoBaseClient
# Initialize client
client = ProtoBaseClient()
# Sign up using email
response = client.signup_email("john_doe", "securepassword123", "john.doe@example.com", "api_token")
print(response)
# Sign in using email
signin_response = client.signin_email("john_doe", "securepassword123", "john.doe@example.com", "api_token")
print(signin_response)
Contributing
We welcome contributions to the ProtoBase Client! If you would like to improve or add features, feel free to fork the repository, create a branch, and submit a pull request.
Please ensure that you follow the contribution guidelines:
- Write clear and descriptive commit messages.
- Add tests for new features or bug fixes.
- Follow Python coding standards (PEP 8).
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgements
- Thanks to the ProtoBase API for providing the authentication backend.
- Inspired by the desire to simplify authentication workflows in Python.
Contact
For support or inquiries, you can reach out to k.akashkumar@gmail.com.
Customizing the GitHub Documentation
- Badges: You can add badges like build status, license, and PyPI version by using shields.io or similar services.
- Screenshots: If the package includes a GUI or more visual outputs, add screenshots to illustrate the usage.
- Links to Documentation: If your package is further documented elsewhere (like ReadTheDocs), include those links.
Example of a Badge Section
Release files for protobase-client 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| protobase-client-2.0.0.tar.gz | 4.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| protobase_client-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.4 kB
Release files / protobase-client-2.0.0.tar.gz
| Download URL | protobase-client-2.0.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
042e0ef364bcc0d25cf81911d7d98acf7922beeb9c3671de942b72431016fac9
|
|
BLAKE2b-256 checksum How to use checksums |
af603c3ea3fed92cbbcdf722f2d774897f3bdc3fc266db51e64bd9b6a19e7103
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.10.9
|
Release files / protobase_client-2.0.0-py3-none-any.whl
| Download URL | protobase_client-2.0.0-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
630f712187290f4bd301bee5eb959ac315b1a96478762dafbe84369b9f0df742
|
|
BLAKE2b-256 checksum How to use checksums |
ca3a8a79b63d42cd9eeba5d15882330bdefa512eb1e0b69492132c1f9ac96b18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.10.9
|