Skip to main content

@centroid framework for python

Project description

pycentroid

pycentroid logo

@themost-framework for Python

@themost-framework is a fully-featured end-to-end framework for building scalable data-driven web applications and services. It consists of a wide set of server-side libraries and client-side tools for helping developers creating scalable and configuratable 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


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()

pycentroid.query

A database-agnostic query module which for writing SQL expressions of any kind

from pycentroid.query import QueryExpression, QueryEntity, SqlFormatter


products = new 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 pycentroid.data.context import DataContext


app = DataApplication(cwd=APP_PATH)
context = app.create_context()
results = await context.model('Order').where(
    lambda x: x.orderedItem.category == 'Desktops'
    ).get_items()

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

pycentroid-1.1.0.tar.gz (57.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycentroid-1.1.0-py3-none-any.whl (71.8 kB view details)

Uploaded Python 3

File details

Details for the file pycentroid-1.1.0.tar.gz.

File metadata

  • Download URL: pycentroid-1.1.0.tar.gz
  • Upload date:
  • Size: 57.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for pycentroid-1.1.0.tar.gz
Algorithm Hash digest
SHA256 2c7b09f4d989c56bb5f62306eb4e34b485365a2b758f0a656c51b83ebfbfda91
MD5 d8ac3a5907d4c116f71dd0ac98c9f23d
BLAKE2b-256 a28c81d5f3775892c36eeaeb1994be0ac836f12ad4adb8ee9ec2fe64d939616e

See more details on using hashes here.

File details

Details for the file pycentroid-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pycentroid-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 71.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for pycentroid-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5bc33b29b784249b2112c5f83193d710d70962001ec011cdcecd9dbf33dedc1e
MD5 18d40d7e4988a423d23537f4eba6f039
BLAKE2b-256 3a416e026cfbfca370b1a70d879de8693fbc9cadffc22c932138fa1d91638699

See more details on using hashes here.

Supported by

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