The package manager of a Customizable e-democracy opinion collection and insight mining system.
Project description
LitePolis
Infrastructure for E-democracy
Overview
LitePolis is an advanced, Python-based infrastructure designed for building customizable opinion collection systems, extending beyond the capabilities of the original Polis. It offers a developer-friendly environment focused on flexibility and power.
Built with a modular, microservice-like architecture, LitePolis is distributed by default, leveraging the Ray framework for inherent auto-scaling capabilities right out of the box. This ensures your applications can handle large groups and high traffic volumes efficiently.
The core of LitePolis is a central package manager that discovers and orchestrates various components – API Routers, Middleware, and UI Packages. This modularity allows developers and data scientists to easily build, deploy, and iterate on sophisticated data-driven e-democracy tools and other opinion-gathering applications.
Quick start
1. Install the LitePolis CLI
The litepolis-cli is your main tool for creating, managing, and deploying LitePolis packages.
- Needs Python (3.12 recommended) and pip installed.
pip install litepolis
2. Explore Packages for Deployment
3. Deploy
Add features you want in LitePolis
litepolis-cli deploy list-deps
# remove packages if you don't need default packages that provides Polis functionality
litepolis-cli deploy remove-deps litepolis-router-default
# add packages that you need
litepolis-cli deploy add-deps litepolis-router-example
# setup default config for packages in `~/.litepolis/config.conf`
litepolis-cli deploy init-config
# setup password etc.
nano ~/.litepolis/config.conf
# start serving
litepolis-cli deploy serve
# Or: start a local head node and serve in one go
litepolis-cli deploy local
# Or deploy to remote cluster
litepolis-cli deploy --cluster ray://<head-node-ip>:10001 serve
For Developers
To build new package for the LitePolis ecosystem
# Create a new router package
litepolis-cli create router litepolis-router-myrouter
# Create a new database adapter
litepolis-cli create database litepolis-database-mydb
# Create a new middleware package
litepolis-cli create middleware litepolis-middleware-mymiddleware
# Create a new UI component
litepolis-cli create ui litepolis-ui-mypanel
Each command clones the appropriate template repo, renames everything to match your package name, and re-initializes git so you can push to your own repo.
After scaffolding:
cd litepolis-router-myrouter
git remote add origin YOUR_REPO_URL
git push -u origin main
Package requirements
Each package must expose at module level:
router— a FastAPIAPIRouterinstanceprefix— the API path prefix string (e.g."v3")dependencies— list of FastAPI dependencies (can be[])DEFAULT_CONFIG— adict[str, str]of default config values (used byinit-config)
For database, middleware, and UI packages, the scaffolded template will show the expected interface.
CLI Reference
litepolis-cli deploy [OPTIONS] COMMAND
Options:
--packages-file PATH Path to packages.txt [default: ~/.litepolis/packages.txt]
--cluster TEXT Ray cluster address [default: auto]
Commands:
add-deps Add or update a package in packages.txt and install it
remove-deps Remove a package from packages.txt
list-deps Compare packages.txt with currently installed versions
sync-deps Install all packages in packages.txt to their pinned versions
init-config Generate ~/.litepolis/config.conf from installed packages
serve Start the LitePolis API server
local Start a local Ray head node and serve
litepolis-cli create COMMAND
Commands:
router Scaffold a new router package
database Scaffold a new database package
middleware Scaffold a new middleware package
ui Scaffold a new UI package
Next Steps:
- Use StarRocks as database [WIP#todo]
- Deploy to Google cloud with autoscale [WIP#todo]
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 litepolis-1.0.7.tar.gz.
File metadata
- Download URL: litepolis-1.0.7.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
875e6950af8c664faae2380411e7151e598dafbc526c5a75b413664666b7dcf6
|
|
| MD5 |
6b6cede5f91585c38130e4f05335f189
|
|
| BLAKE2b-256 |
59cf6287e433a22d8922f33e708d3b4a87e1ac7a1f2bf26666453084550882ef
|
Provenance
The following attestation bundles were made for litepolis-1.0.7.tar.gz:
Publisher:
python-publish.yml on NewJerseyStyle/LitePolis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
litepolis-1.0.7.tar.gz -
Subject digest:
875e6950af8c664faae2380411e7151e598dafbc526c5a75b413664666b7dcf6 - Sigstore transparency entry: 1171901788
- Sigstore integration time:
-
Permalink:
NewJerseyStyle/LitePolis@dabee333ce6add584da086dc7a7673d45bb95f8b -
Branch / Tag:
refs/tags/v1.0.7 - Owner: https://github.com/NewJerseyStyle
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@dabee333ce6add584da086dc7a7673d45bb95f8b -
Trigger Event:
release
-
Statement type:
File details
Details for the file litepolis-1.0.7-py3-none-any.whl.
File metadata
- Download URL: litepolis-1.0.7-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba0e0177a2948cdd376546ce25fc05c0260a1687ef4966af72626574ffe3bfb4
|
|
| MD5 |
07aa20f6b54bdd70e48fcf82ee173ce6
|
|
| BLAKE2b-256 |
1f442ef8fb88eea14836890971c264059a0f0bf694d0c39229260d5dbf4b42a3
|
Provenance
The following attestation bundles were made for litepolis-1.0.7-py3-none-any.whl:
Publisher:
python-publish.yml on NewJerseyStyle/LitePolis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
litepolis-1.0.7-py3-none-any.whl -
Subject digest:
ba0e0177a2948cdd376546ce25fc05c0260a1687ef4966af72626574ffe3bfb4 - Sigstore transparency entry: 1171901793
- Sigstore integration time:
-
Permalink:
NewJerseyStyle/LitePolis@dabee333ce6add584da086dc7a7673d45bb95f8b -
Branch / Tag:
refs/tags/v1.0.7 - Owner: https://github.com/NewJerseyStyle
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@dabee333ce6add584da086dc7a7673d45bb95f8b -
Trigger Event:
release
-
Statement type: