AllInOne Framework for Python/PyPy
Project description
cemirfw
Install
sudo bash install.sh
cemirfw start
cemirfw stop
cemirfw restart
cemirfw disable
cemirfw status
Sample endpoints
from func_dbs import db_query, Tablo
from func_handlers import put, get, check_params
@put(r"/fiyat-guncelle", auth=False, redis_cache_params={"expire_time": 30, "key": "ip,useragent"})
async def putete(request, data):
table = Tablo("test1")
# ins_result = await table.insert(name="asd", blocked=True, content=data).execute()
# upd_result = await table.update(blocked=True, name="asdasdasdasdasdasd").where(id=7).execute()
# del_result = await table.where(id=15).delete()
# sel_result = await table.select("*", fetchall=True).wherenot(name=["asd", "John", "Johdddddddddddddddddn"]).order('id').asc().execute()
# sel_result = await table.select("*", fetchall=True).wherenot(id=3).order('id').asc().execute()
# sel_result = await table.select("*", fetchall=True).wherenot(name="Johdddddddddddddddddn").order('id').asc().execute()
# sel_result = await table.select("*", fetchall=True).likenot(name="John").order('id').asc().execute()
# sel_result = await table.select("*", fetchall=True).likeew(name="hn").order('id').asc().execute()
# sel_result = await table.select("*", fetchall=True).likenotew(name="asd").order('id').asc().execute()
# sel_result = await table.select("*", fetchall=True).likesw(name="Jo").order('id').asc().execute()
sel_result = await table.select("*", fetchall=True).likenotsw(name="asd").order('id').asc().execute()
# sel_result = await table.select("*").where(id=7).execute()
return sel_result
@get(r"/pi", redis_cache_params={"expire_time": 3, "key": "ip,useragent"})
@check_params(["id"])
async def get_pi(request):
id = request.params("id")
# return await db_query("SELECT content FROM accounting__customer_proforma_invoices where id=%s;", id, False, 2, "proformainvoices")
return await db_query("SELECT content FROM test1 where id in (1,2,3,4);", id, True, 2, "proformainvoices")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cemirfw-20240624.1.tar.gz
(2.6 kB
view details)
Built Distribution
File details
Details for the file cemirfw-20240624.1.tar.gz
.
File metadata
- Download URL: cemirfw-20240624.1.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 944188c9e1425844cb315baeb95f98144c01dabcdd3ece3f659a2569b754a347 |
|
MD5 | 1101217e6164a135790358aeeb2d8d4d |
|
BLAKE2b-256 | 60af793027c523885d42536a14d406cc64e71f875985abf2ca0f297fc561d292 |
File details
Details for the file cemirfw-20240624.1-py3-none-any.whl
.
File metadata
- Download URL: cemirfw-20240624.1-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 462ccb8f9fadb8c3932b40e1a2aecf6897f781416cf49377c5ddc32dfe589dd0 |
|
MD5 | f64a86c1c9b53e491bba3a52d9cef1b9 |
|
BLAKE2b-256 | 557b1f2f4934c7851042d0172a8358e19cb64495f2d02aebc9559383c5be20da |