Jdbase-client Docs
Jdbase-client Documentation
Overview
jdbase-client
is a Python library designed to provide a convenient interface for interacting with JDBase remote database via an HTTP API. It simplifies common database operations such as creating, reading, updating, and deleting records, as well as performing custom queries. This library assumes that a compatible server is running and accessible at the provided API endpoint.
Installation
You can install jdbase-client
via pip:
Usage
To use jdbase-client
, you need to instantiate a Database
object with the necessary configuration. This configuration includes the API key, API endpoint, and the name of the database. Once instantiated, you can use this object to perform various database operations.
Example
Class: Database
Database
Methods
create(query: dict) -> dict
Creates a new record in the database.
query
: A dictionary representing the data to be inserted.
Example:
Returns: A dictionary containing the result of the operation.
get_by(query: dict) -> dict
Retrieves records from the database based on the provided query.
query
: A dictionary representing the query parameters. Example:db.get_by({"id: 5})
Returns: A dictionary containing the retrieved records.
update(query: dict, update_query: dict) -> dict
Updates records in the database based on the provided query and update query.
query
: A dictionary representing the query to identify records to be updated.update_query
: A dictionary representing the update operation to be performed on matching records.
Example:
Returns: A dictionary containing the result of the operation.
delete(query: dict) -> dict
Deletes records from the database based on the provided query.
query
: A dictionary representing the query to identify records to be deleted.
Example:
Returns: A dictionary containing the result of the operation.
match(query: dict) -> dict
Performs a custom matching query on the database.
query
: A dictionary representing the matching criteria.
Example:
Returns: A dictionary containing the matching records.
create_db(query: dict) -> dict
Creating New Database.
query
: A dictionary representing Name of Database
Example:
Returns: A dictionary containing the matching records.
Conclusion
jdbase-client
simplifies database interactions by providing an easy-to-use interface for common operations. By following the provided documentation, you can seamlessly integrate this library into your Python projects and interact with your JDBase remote database.
Checkout JDBase Here
Last updated