Skip to main content

Textoria API

Textoria API is a simple key-value store API that allows you to store, retrieve, update, and delete key-value pairs. It is built using aiohttp and provides an asynchronous interface for efficient and fast operations.

Features

  • Store key-value pairs
  • Retrieve all key-value pairs
  • Update the value of a specific key
  • Delete a specific key-value pair

Installation

To use the Textoria API, simply clone the repository and install the required dependencies:

git clone https://github.com/your_username/textoria-api.git
cd textoria-api
pip install -r requirements.txt

Usage

First, you need to instantiate the Textoria class with the API URL:

from textoria import Textoria

api_url = "https://example.com/api"
textoria = Textoria(api_url)

Get all keys

To retrieve all the key-value pairs stored in the system, you can use the get_all_keys method:

keys = await textoria.get_all_keys()
print(keys)

Create a new key-value pair

To create a new key-value pair, use the create_key method with the key and value as arguments:

new_key = "example_key"
new_value = "example_value"
response = await textoria.create_key(new_key, new_value)
print(response)

Update an existing key-value pair

To update the value of an existing key, use the update_key method with the key and the new value as arguments:

key = "example_key"
new_value = "updated_value"
response = await textoria.update_key(key, new_value)
print(response)

Delete a key-value pair

To delete a specific key-value pair, use the delete_key method with the key as argument:

key = "example_key"
response = await textoria.delete_key(key)
print(response)

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue to report bugs or suggest improvements.

License

This project is released under the MIT License.

Release files for textoria 0.0.1

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

Source distribution (sdist)

Source distribution for textoria 0.0.1
File Size Uploaded
textoria-0.0.1.tar.gz 3.8 kB Details

Release files / textoria-0.0.1.tar.gz

Download URL textoria-0.0.1.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d30e7d0397f60f77c4ce809aad193d559ee7c17011543d910049ca5f167c366f
BLAKE2b-256 checksum
How to use checksums
c758aa9f63c0453f2d5ac9d81a818aab54454c02f6bfa72333acc45194295d2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file

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