Skip to main content

PyBase

Netlify Status Python Versions Version Downloads Discord License

PyBase is focused on the ease and effectiveness for the administration of databases.

PyBase is actually on Beta phase, may contain bugs.


Why PyBase?

If you want to store static data (JSON, YAML, Bytes) or store a database in SQLite, the best thing would be to use an administrator that simplifies your tasks and helps you with a good organization and efficiently.

PyBase does exactly that, allows you to create such databases with just one method, and simplifies the task of manipulating their data!


Contribuitors


Quick start

Installation

PyBase requires Python 3.x and can be installed through pip with the following command.

# Stable version
python3 -m pip install -U pybase_db

# Pre-release (Development) version
python3 -m pip install -U --pre pybase_db

# From github's latest commit
# Available branches:
#   • master (recommended)
#   • development (unstable releases)
# NOTE: this installation mode will not install PyBase dependencies!
python3 -m pip install -U git+https://github.com/PyBase/PyBase@branch

Building

The development branch changes aren't compiled and uploaded to Pypi every time, so you must compile a wheel yourself to test the experimental stuff if the newest changes aren't uploaded to Pypi.

python3 setup.py bdist_wheel

python3 -m pip install -U dist/pybase_db-version-py3-none-any.whl

Usage example

This is a brief example of the methods that PyBase currently has.

# Lets import PyBase Class from PyBase Package
from pybase import PyBase

# Lets define our database name and format (with default db_path).
# db_type isn't case sensitive. You can use JSON and json and it'll be valid.
db = PyBase("example", "JSON")  #=> ./example.json

# Lets define and add some content to our database.
pybase_info = {"pybase": "awesomeness", "version": "0.3.0"}

# Lets insert the defined dict inside our database.
db.insert(pybase_info)  #=> {'pybase': 'awesomeness', 'version': '0.3.0'}
print(db.get())

# Lets delete an object inside our database cuz it's useless.
db.delete('pybase')  #=> {'version': '0.3.0'}
print(db.get())

# Lets fetch an object inside our database and display its type.
# It's useful to debug and manipulate the data dynamically.
print(db.fetch('version'))

#Gets the corresponding value according to the specified key
print(db.get("version")) #=> '0.3.0'

To see SQLite3 usage example, click here

Documentation

You can see the PyBase documentation through the help() function of the REPL and through the official documentation site.


License

PyBase is distributed under MIT License.

Contributing

You can see how to contribute here

Code of Conduct

You can see the code of conduct here

Metadata

Release files for pybase-db 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pybase-db 0.5.0
File Size Uploaded
pybase_db-0.5.0.tar.gz 12.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pybase-db 0.5.0
File Interpreter ABI Platform
pybase_db-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.8 kB

Release files / pybase_db-0.5.0.tar.gz

Download URL pybase_db-0.5.0.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
387caf25839f3369eab8765180a2385587e6f33b61ba93a6982c50ba2b18c288
BLAKE2b-256 checksum
How to use checksums
edb73dbd67d09e5587a151edca59e2269b495a457fe3b63cf59c0ab4cc1454cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

Release files / pybase_db-0.5.0-py3-none-any.whl

Download URL pybase_db-0.5.0-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db1d8b20d7e9f02b843f53abb4b3ada8fade9379be644272c96e2d57d7e1aad3
BLAKE2b-256 checksum
How to use checksums
4620ecb618125eb49143394d65fa8d49bb17fcb018c67e8b1f0000cfa2dced2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page