SelfHosted DB
Project description
Ghostbase
Introduction
Ghostbase is a Python library that provides a simple interface for interacting with a Flask server that manages user databases. With Ghostbase, you can create databases, add users, validate user credentials, and edit user pro status.
IMPORTANT NOTICES
- Please note since ghostbase 1.2.6 the url is not needed and set to
https://db.ghostai.me/
- Please note since ghostbase 1.2.6 the apikey is needed after the function check below for more info
Getting Started
Installation
To use Ghostbase, you will need to have the requests
library installed. You can install it using pip:
pip install requests
Setting up the Flask Server
Before using Ghostbase, you will need to set up the Flask server that it interacts with. You will need to set the base_url
variable to the URL of the Flask server, and you will need to obtain an API key to use for authentication.
The default base url that you can set is - https://db.ghostai.me/
you will need to contact cyberzendev@gmail.com
if you want to use the api key
Importing the Library
To use Ghostbase, simply import it into your Python script:
import ghostbase
Functions
Creates a new database with the given name
ghostbase.create_database(db_name,api_key)
Validates a user's credentials and returns a success message if they are valid
ghostbase.validate_user(db_name, username, password,api_key)
Adds a new user to the database
ghostbase.add_user(db_name, username, email, password, pro_status,api_key)
Deletes a user from the database
ghostbase.delete_user(db_name, username,api_key)
Edits a user's pro status
ghostbase.edit_user_pro_status(db_name, username, pro_status,api_key)
Returns a user's pro status as a boolean value (True or False)
ghostbase.return_pro_status(db_name, username,api_key)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file ghostbase-1.2.6-py3-none-any.whl
.
File metadata
- Download URL: ghostbase-1.2.6-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dabfe78adfe1053fbcb296513252e62cc1e17ff3d030e69601767f3ddeb71549 |
|
MD5 | dd5ffdd1a8f2a0b3129f73bc864774d0 |
|
BLAKE2b-256 | 00b88f16379f9e4c6505e01183c07c2856a4cad1d4be9be8ee55d0e2c0997d79 |