- Notifications
You must be signed in to change notification settings - Fork0
FlyDB python version of the sdk
License
ByteStorage/FlyDB-SDK-Python
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
FlyDB's github address:https://github.com/ByteStorage/FlyDB
English |中文
FlyDB-SDK-Python is a software development toolkit (SDK) for interacting with the FlyDB key-value database in Python.
FlyDB is a high-performance, lightweight key-value database, and with this SDK, you can easily use FlyDB to store and retrieve data in Python.
To use FlyDB-SDK-Python, you first need to install the FlyDB server and ensure it is running.
You can install FlyDB-SDK-Python using pip, by running the following command:
pip install FlyDB==0.0.3Here's a simple example showing how to use FlyDB-SDK-Python to connect to the FlyDB server and perform data storage and retrieval:
frompathlibimportPathfromFlyDBimportdb# Create a FlyDB2 clientdb_client=db.FlyDB()# Connect to the FlyDB2path=Path.cwd().joinpath("data")db_client.connect_option(str(path),256*1024*1024,True)# Set a key-value pairdb_client.set("key","value",0)# Get the value of a keyvalue=db_client.get("key")print(value)# Delete a key-value pairdb_client.delete("key")
FlyDB-SDK-Python currently supports the following APIs:
set(key, value, expire): Stores a key-value pair in the database. The key should be a string, and the value can be a string, integer, float, boolean, or byte stream. The expire parameter represents the expiration time in milliseconds. When expire is set to 0, the data will never expire.
get(key): Retrieves the value of a specified key from the database. The return value type depends on the actual stored data type.
delete(key): Deletes the specified key-value pair from the database.
For more API reference and detailed usage, please refer to the official documentation or the SDK source code.
If you encounter any issues or have any suggestions, please feel free to raise them. We welcome contributions from the community. If you want to contribute to the FlyDB-SDK-Python project, please submit a Pull Request or contact our development team.
FlyDB-SDK-Python is licensed under the MIT License. For details, please refer to the LICENSE file.
FlyDB-SDK-Python is the official Python SDK for the FlyDB project, maintained and supported by the FlyDB team. Thank you for using FlyDB-SDK-Python, and we hope it brings convenience to your data storage and retrieval tasks!
About
FlyDB python version of the sdk
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
