pycentroid
@themost-framework for Python
@themost-framework is a fully-featured end-to-end framework for building scalable data-driven web applications and services under node.js. It consists of a wide set of server-side libraries and client-side tools for helping developers creating scalable and configurable production environments. pycentroid is a @themost-framework alternative for python.
pycentroid.client
A client-side library of @themost-framework application for python
from typing import List
from pycentroid.client import ClientDataContext, ClientContextOptions
from pycentroid.query import select
async def get_products():
context = ClientDataContext(ClientContextOptions('http://localhost:3000/api/'))
# get products
items: List = await context.model('Products').as_queryable().select(
lambda x: select(id=x.id, name=x.name, product_model=x.model,)
).where(
lambda x: x.category == 'Laptops'
).get_items()
return items
Read more at pycentroid.client
pycentroid.query
A database-agnostic query module which for writing SQL expressions of any kind
from pycentroid.query import QueryExpression, QueryEntity, SqlFormatter, select
products = QueryEntity('ProductData')
query = QueryExpression(products).select(
lambda x: select(id=x.id, name=x.name, price=round(x.price, 2))
).where(
lambda x: round(x.price, 2) < 800 and x.category == 'Laptops'
)
sql = SqlFormatter().format(query)
# sql > SELECT id,name,ROUND(price,2) AS price FROM ProductData WHERE ((ROUND(price,2)<800) AND (category='Laptops'))
pycentroid.data
A next-generation ORM data module for developing data-driven application and services.
from pycentroid.data.application import DataApplication
from os.path import abspath, join, dirname
APP_PATH = abspath(join(dirname(__file__), '..'))
async def main():
app = DataApplication(cwd=APP_PATH)
context = app.create_context()
results = await context.model('Order').where(
lambda x: x.orderedItem.category == 'Desktops'
).get_items()
print(results)
Metadata
Release files for pycentroid 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pycentroid-2.0.0.tar.gz | 59.7 kB | Without provenance | Details for pycentroid-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pycentroid-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for pycentroid-2.0.0-py3-none-any.whl |
Total release size: 134.7 kB
Release files / pycentroid-2.0.0.tar.gz
| Download URL | pycentroid-2.0.0.tar.gz |
|---|---|
| Size | 59.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dc0defb20001ff683fcd3153988113a5f934ef22e4ff7d22e2fea32eebe6a773
|
|
BLAKE2b-256 checksum How to use checksums |
3edfdbf8cdc212210a2085ee039915cd5c287c6ff4bc6b0746a235df29d5bb0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.21
|
Release files / pycentroid-2.0.0-py3-none-any.whl
| Download URL | pycentroid-2.0.0-py3-none-any.whl |
|---|---|
| Size | 75.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cfe0d871c20be8838256684d9b8e3ba70d17d24c3ce40b9ba71735f070a3e039
|
|
BLAKE2b-256 checksum How to use checksums |
f70fe2a2ebf6d0eaf33c7b9c2a5168fa1665e1a28e8cb4dbc32344e241d1d8d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.21
|
Security for pycentroid 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.