# 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:
```bash
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:
```python
import ghostbase
```
## Functions
### Creates a new database with the given name
```python
ghostbase.create_database(db_name,api_key)
```
### Validates a user's credentials and returns a success message if they are valid
```python
ghostbase.validate_user(db_name, username, password,api_key)
```
### Adds a new user to the database
```python
ghostbase.add_user(db_name, username, email, password, pro_status,api_key)
```
### Deletes a user from the database
```python
ghostbase.delete_user(db_name, username,api_key)
```
### Edits a user's pro status
```python
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)
```python
ghostbase.return_pro_status(db_name, username,api_key)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/CyberZenDev/ghostbase",
"name": "ghostbase",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "flask sqlite database",
"author": "CyberZenDev",
"author_email": "cyberzendev@gmail.com",
"download_url": null,
"platform": null,
"description": "# Ghostbase \r\n\r\n## Introduction\r\n\r\nGhostbase 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.\r\n\r\n## IMPORTANT NOTICES\r\n\r\n- Please note since ghostbase 1.2.6 the url is not needed and set to `https://db.ghostai.me/`\r\n- Please note since ghostbase 1.2.6 the apikey is needed after the function check below for more info\r\n\r\n## Getting Started\r\n\r\n### Installation\r\n\r\nTo use Ghostbase, you will need to have the `requests` library installed. You can install it using pip:\r\n\r\n```bash\r\npip install requests\r\n```\r\n\r\n### Setting up the Flask Server\r\n\r\nBefore 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.\r\nThe 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\r\n\r\n### Importing the Library\r\n\r\nTo use Ghostbase, simply import it into your Python script:\r\n\r\n```python\r\nimport ghostbase\r\n```\r\n\r\n## Functions\r\n\r\n### Creates a new database with the given name\r\n\r\n```python\r\nghostbase.create_database(db_name,api_key)\r\n```\r\n\r\n### Validates a user's credentials and returns a success message if they are valid\r\n\r\n```python\r\nghostbase.validate_user(db_name, username, password,api_key)\r\n```\r\n\r\n### Adds a new user to the database\r\n\r\n```python\r\nghostbase.add_user(db_name, username, email, password, pro_status,api_key)\r\n```\r\n\r\n### Deletes a user from the database\r\n\r\n```python\r\nghostbase.delete_user(db_name, username,api_key)\r\n```\r\n\r\n### Edits a user's pro status\r\n\r\n```python\r\nghostbase.edit_user_pro_status(db_name, username, pro_status,api_key)\r\n```\r\n\r\n### Returns a user's pro status as a boolean value (True or False)\r\n\r\n```python\r\nghostbase.return_pro_status(db_name, username,api_key)\r\n```\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "SelfHosted DB",
"version": "1.2.6",
"project_urls": {
"Homepage": "https://github.com/CyberZenDev/ghostbase"
},
"split_keywords": [
"flask",
"sqlite",
"database"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "00b88f16379f9e4c6505e01183c07c2856a4cad1d4be9be8ee55d0e2c0997d79",
"md5": "dd5ffdd1a8f2a0b3129f73bc864774d0",
"sha256": "dabfe78adfe1053fbcb296513252e62cc1e17ff3d030e69601767f3ddeb71549"
},
"downloads": -1,
"filename": "ghostbase-1.2.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "dd5ffdd1a8f2a0b3129f73bc864774d0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 3284,
"upload_time": "2024-05-05T07:39:05",
"upload_time_iso_8601": "2024-05-05T07:39:05.463142Z",
"url": "https://files.pythonhosted.org/packages/00/b8/8f16379f9e4c6505e01183c07c2856a4cad1d4be9be8ee55d0e2c0997d79/ghostbase-1.2.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-05 07:39:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "CyberZenDev",
"github_project": "ghostbase",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "ghostbase"
}