Skip to main content

A Python client for the ProtoBase authentication API

Project description

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

PyPI License

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

protobase-client-2.0.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

protobase_client-2.0.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file protobase-client-2.0.0.tar.gz.

File metadata

  • Download URL: protobase-client-2.0.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.9

File hashes

Hashes for protobase-client-2.0.0.tar.gz
Algorithm Hash digest
SHA256 042e0ef364bcc0d25cf81911d7d98acf7922beeb9c3671de942b72431016fac9
MD5 23b0aa5daa6adba882cc4b39fb7c648a
BLAKE2b-256 af603c3ea3fed92cbbcdf722f2d774897f3bdc3fc266db51e64bd9b6a19e7103

See more details on using hashes here.

File details

Details for the file protobase_client-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for protobase_client-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 630f712187290f4bd301bee5eb959ac315b1a96478762dafbe84369b9f0df742
MD5 3dac16dd04b5d0fbfec8a479ca08b6e0
BLAKE2b-256 ca3a8a79b63d42cd9eeba5d15882330bdefa512eb1e0b69492132c1f9ac96b18

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