Skip to main content

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


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)

Uploaded Source

Built Distribution

cemirfw-20240624.1-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

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

Hashes for cemirfw-20240624.1.tar.gz
Algorithm Hash digest
SHA256 944188c9e1425844cb315baeb95f98144c01dabcdd3ece3f659a2569b754a347
MD5 1101217e6164a135790358aeeb2d8d4d
BLAKE2b-256 60af793027c523885d42536a14d406cc64e71f875985abf2ca0f297fc561d292

See more details on using hashes here.

File details

Details for the file cemirfw-20240624.1-py3-none-any.whl.

File metadata

File hashes

Hashes for cemirfw-20240624.1-py3-none-any.whl
Algorithm Hash digest
SHA256 462ccb8f9fadb8c3932b40e1a2aecf6897f781416cf49377c5ddc32dfe589dd0
MD5 f64a86c1c9b53e491bba3a52d9cef1b9
BLAKE2b-256 557b1f2f4934c7851042d0172a8358e19cb64495f2d02aebc9559383c5be20da

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page