Skip to main content

Personal Interface

The Personal Interface is a Python project that provides a simple model for connecting to a database using the Deta library, among other utilities as loggers. It offers basic database operations such as querying, creating, updating, and deleting records. This README provides an overview of the project, installation instructions, and usage examples.

Table of Contents

Installation

Before you can use the Personal Interface, make sure you have Python installed on your system. You'll also need to set up a Deta project and obtain an API key. Follow these steps to get started:

  1. Clone the repository:

    pip install pyworkbench
    
  2. Set your Deta project API key as an environment variable:

    Method 1

    Using bash:

    export DB_ACCESS_TOKEN=your_api_key
    

    Method 2

    Using a .env

    DB_ACCESS_TOKEN = your_api_key
    

    Replace your_api_key with your actual Deta API key.

  3. Set your private API key to access and use the code:

    Method 1

    Using bash:

    export API_KEY=your_api_key
    

    Method 2

    Using a .env

    API_KEY = your_api_key
    

    Replace your_api_key with your actual Deta API key.

Usage

This interface can only be used with a private API_KEY. Without it, the tool is not functional.

DetaDatabase

The Personal Interface provides a simple way to interact with your Deta database. Here's how you can use it in your Python code:

  1. Import the DetaDatabase class:

    from pyworkbench import DetaDatabase
    
  2. Create an instance of the DetaDatabase class and connect to your Deta database:

    db = DetaDatabase()
    db.connect("your_database_name")
    

    Replace "your_database_name" with the name of your Deta database.

  3. Perform database operations such as querying, creating, updating, and deleting records using the provided methods. For example:

    # Query for records
    data = {"name": "John"}
    results = db.query(data, filter_by="equal")
    
    # Create a new record
    new_data = {"name": "Alice", "age": 30}
    key = db.create(new_data)
    
    # Update an existing record
    updated_data = {"key": key, "age": 31}
    db.update(updated_data)
    
    # Delete a record by its key
    db.delete(key)
    

For more details on how to use the Personal Interface, refer to the Python code documentation in the repository.

Contributing

Contributions to this project are welcome! If you have suggestions, feature requests, or would like to report a bug, please open an issue on the GitHub repository. If you'd like to contribute code, please fork the repository, make your changes, and submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for pyworkbench 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 pyworkbench 0.5.0
File Size Uploaded Provenance Actions
pyworkbench-0.5.0.tar.gz 26.9 kB Without provenance Details for pyworkbench-0.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 59.4 kB

Release files / pyworkbench-0.5.0.tar.gz

Download URL pyworkbench-0.5.0.tar.gz
Size 26.9 kB
Tags Source
SHA-256 checksum
How to use checksums
dfdec08ea37eafae27df39b95389bc950a6666b48fff1334676df87e6cb1b007
BLAKE2b-256 checksum
How to use checksums
87879f3f794ea7e3b26ce9fc4da35b48e984ea65ad68e6d236f9565ffe73fe70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.9

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

Download URL pyworkbench-0.5.0-py3-none-any.whl
Size 32.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
00c8d09761d266ac67756b5b7f2f85d4a7e765bfc5f861270cadf8f906aaf1ef
BLAKE2b-256 checksum
How to use checksums
9f7d21e79d5d23727d15c3c90bbb22294e39504f98bfb6a208dca09441315641
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.9

Security for pyworkbench 0.5.0

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.

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files No provenance

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