Releases: tagoWorks/PyJONDB
PyJONDB
Authentication and Authorization
- Authentication and authorization mechanisms have been implemented for database operations.
- A new
init
class has been introduced, which handles authentication and authorization. - The
__init__
method of theinit
class takes an additional parameterauth
, which is an authentication object. - Most methods in the
init
class now require asession_id
parameter, which is used to authenticate and authorize the user before performing the operation. - If the user is not authenticated or authorized, a
PermissionError
exception is raised. - The
create_collection
method now checks if the user has the 'admin' role before allowing the creation of a new collection.
Code Organization
- The
database
class from the old version has been renamed toinit
. - The
create
,read
,write
,create_collection
,read_collection
,write_collection
,add_document
,find_document
,query
,update_document
,delete_document
,link_collections
,create_tree
, andaggregate
methods have been moved to theinit
class.
Dropped Viewing Tool
- The viewing tool is no longer supported at the moment and a new one will be in the works for a later time.
PyJONDB
Authentication and Authorization
- Authentication and authorization mechanisms have been implemented for database operations.
- A new
init
class has been introduced, which handles authentication and authorization. - The
__init__
method of theinit
class takes an additional parameterauth
, which is an authentication object. - Most methods in the
init
class now require asession_id
parameter, which is used to authenticate and authorize the user before performing the operation. - If the user is not authenticated or authorized, a
PermissionError
exception is raised. - The
create_collection
method now checks if the user has the 'admin' role before allowing the creation of a new collection.
Code Organization
- The
database
class from the old version has been renamed toinit
. - The
create
,read
,write
,create_collection
,read_collection
,write_collection
,add_document
,find_document
,query
,update_document
,delete_document
,link_collections
,create_tree
, andaggregate
methods have been moved to theinit
class.
Minor Changes
- The session module has a new
work_in_db_dir
bool which can determine weather or not to have the user data stores in a databases directory or in the same if set to false. It is true by default. - Files were not imported in previous versions of the package
PyJONDB
Authentication and Authorization
- Authentication and authorization mechanisms have been implemented for database operations.
- A new
init
class has been introduced, which handles authentication and authorization. - The
__init__
method of theinit
class takes an additional parameterauth
, which is an authentication object. - Most methods in the
init
class now require asession_id
parameter, which is used to authenticate and authorize the user before performing the operation. - If the user is not authenticated or authorized, a
PermissionError
exception is raised. - The
create_collection
method now checks if the user has the 'admin' role before allowing the creation of a new collection.
Code Organization
- The
database
class from the old version has been renamed toinit
. - The
create
,read
,write
,create_collection
,read_collection
,write_collection
,add_document
,find_document
,query
,update_document
,delete_document
,link_collections
,create_tree
, andaggregate
methods have been moved to theinit
class.
Minor Changes
- The ASCII art banner at the top of the file has been updated with version information.
- Some formatting and indentation changes have been made.
PyJONDB
Big Features on PyJONDB
Data Encryption
Utilizes Fernet symmetric encryption for data security.
Supports double-layer encryption for added protection.
Database Operations:
Create Database
Creates a new database file with metadata.
Read Database: Decrypts and reads data from an existing database file.
Write Database: Encrypts and writes data to the database file.
Collection Management:
Create Collection
Adds a new collection to the database.
Read Collection: Retrieves documents from a specified collection.
Write Collection: Inserts documents into a collection.
Add Document: Adds a single document to a collection.
Document Manipulation:
Find Document
Searches for documents in a collection based on a query.
Update Document: Updates a document in a collection.
Delete Document: Removes a document from a collection.
Querying
Supports various query operations like $and, $or, $gt, $lt, $gte, $lte, $eq, and $ne.
Linking Collections
Establishes relationships between collections by creating reference fields.
Tree Structure Creation
Builds hierarchical tree structures by linking parent and child documents.
Aggregation
Performs aggregation operations on documents using a specified pipeline.