pysdb
pysdb is a lightweight , portable, embeddable database management library
Import first:
import pysdb
concepts
SDB_STORE
SDB_STORE is a group of Databases
it's the directory where all the Databases exists.
SDB_STORE can be created by the following command:
$ mkdir /path/to/SDB_STORE/ && touch /path/to/SDB_STORE/sdbstore
if you prefer a different directory name change DB_STORE to whatever name you like , for example:
$ mkdir /path/to/MY_STORE/ && touch /path/to/MY_STORE/sdbstore
DATABASE
group of Collections is a Database
COLLECTIONS
a bundle of Records is a collection (it's kinda like a Table)
Records
Records are like a row in a table
Record is pure python Dictionary
example:
student_record1 = {
"name": "student1_name1",
"age":19
}
example
import pysdb
store = sdb.UseStore('/path/to/DB_STORE/') # use the created store (returns a pointer to store)
store.CreateDB('db') # creates a db in store (returns true or false)
db = store.OpenDB('db') # opens a db in store (return a pointer to db)
store.CloseDB('db') # closes an opened db
store.DropDB('db') # deletes the entire database (return true or false)
store.LookForDB('db') # checks if a Database exists (returns true or false)
db.CreateCl('cl') # creates a collection in db (returns true or false)
cl = db.OpenCl('cl') # opens a collection in db (returns a pointer to the collection)
db.CloseCl('cl') # closes the collection
db.DropCl('cl') # deletes a collection in db (returns true or false)
db.LookForCl('cl') # checks if a collection exists (returns true or false)
# create a record (pure python dictionary)
student_record1 = {
"name": "student_name1",
"age":19
}
student_record2 = {
"name": "student_name2",
"age":20
}
cl.AddRec('student_record_1', student_record1) # adds a record to cl
cl.UpdateRect('student_record_1', student_record2) # updates the record in cl
cl.ReadRec('student_record_1') # returns a Record ( python dictionary - same as above student_record1 )
cl.RemoveRect('student_record_1') # removes a Record in cl
Metadata
Release files for pysdb 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pysdb-0.0.2.tar.gz | 3.1 kB | Without provenance | Details for pysdb-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pysdb-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for pysdb-0.0.2-py3-none-any.whl |
Total release size: 6.2 kB
Release files / pysdb-0.0.2.tar.gz
| Download URL | pysdb-0.0.2.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce622b60bdac6ac68c8385e22db313f27d654cf321a189398b295eb70e216087
|
|
BLAKE2b-256 checksum How to use checksums |
b1c279967ba1736774ac1fc546c16b72b371b7a70f9d5b1fc76dc7627646d45c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.2
|
Release files / pysdb-0.0.2-py3-none-any.whl
| Download URL | pysdb-0.0.2-py3-none-any.whl |
|---|---|
| Size | 3.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
74c3c0c9f59e035da3201baf060d788893a5cb3f58268f14c0ff38396d3b6c35
|
|
BLAKE2b-256 checksum How to use checksums |
c85e533e1df416c3373d6b860f7b2cf68cf618a572bf98b88e186133a469d952
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.2
|
Security for pysdb 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.