A client library for interacting with LonaDB server
Project description
Installation
You can install the LonaDB Python Client via pip:
pip install lonadb-client
Usage
To use the LonaDB Python Client, follow these steps:
- Import the
LonaDBclass into your Python script:
from lonadb_client import LonaDB
- Create an instance of the
LonaDBclass by providing the required connection details:
client = LonaDB(host, port, name, password)
Replace host, port, name, and password with the appropriate values for your LonaDB server.
- Use the provided methods to interact with the server:
# Example: Get a list of tables
tables = client.get_tables("username");
# Display the list of tables
print(tables)
Available Methods
get_tables(user)
Retrieves a list of tables available in the database.
get_table_data(table)
Retrieves data from a specified table.
delete_table(table)
Deletes a table by its name.
create_table(table)
Creates a new table with the given name.
set_variable(table, name, value)
Sets a variable within a table to the specified value.
remove_variable(table, name)
Deletes a variable from a table.
get_variable(table, name)
Retrieves the value of a variable from a table.
get_users()
Retrieves a list of users in the database.
create_user(name, password)
Creates a new user with the given name and password.
delete_user(name)
Deletes a user by their name.
check_password(name, password)
Checks if the provided password is correct for a given user.
check_permission(name, permission)
Checks if a user has a specific permission.
remove_permission(name, permission)
Removes a permission from a user.
get_permissions_raw(name)
Retrieves the raw permission data for a user.
add_permission(name, permission)
Adds a permission to a user.
create_function(name, content)
Create a function which can be executed whenever you want. Just like eval. Content = string of PHP code
execute_function(name)
Executes the function
eval(func)
Runs the function (must be a string of PHP code) Example: "if ($abc == 1234) return 'wtf';" Response: {"success": True, "response": "wtf", "process": processID}
License
This project is licensed under the GNU Affero General Public License version 3 (GNU AGPL-3.0).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lonadb_client-2.3.tar.gz.
File metadata
- Download URL: lonadb_client-2.3.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d151d1d502f0a1e666c5fd8eda38d97be64cebfcf28554073e715b04d9eec58
|
|
| MD5 |
22c3cccf9f85053d060978a2adb098cd
|
|
| BLAKE2b-256 |
cedd3cb39dde64ec2c2b1f49d34bc8764d59a99ddcbaeac5599b8a8c09ae44d6
|
File details
Details for the file lonadb_client-2.3-py3-none-any.whl.
File metadata
- Download URL: lonadb_client-2.3-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
519485c908d427142bcb55aa93fa75d9ab599d54fe6f2e7d44d9894325eff7ee
|
|
| MD5 |
5c97864083a2d10fb6e475e655b3464e
|
|
| BLAKE2b-256 |
1edbb7c786f24cb9eef129e39eba3f05e686289871f2060103036efccfedece4
|