LitePolis Router Default
A drop-in backend for the Polis 1.0 frontend, built on the LitePolis infrastructure.
If you're running a Polis instance (the civic engagement platform with opinion clustering) and want a lightweight, modular backend, this package provides the full /api/v3/* API surface that Polis clients expect — including client-admin, client-participation, and client-report.
What This Is
litepolis-router-default is an API router package for LitePolis. It handles authentication, conversations, participants, comments, votes, and invites — everything the Polis frontend needs to function.
Prerequisites
- Python 3.10+
- LitePolis installed (
pip install litepolis)
Deploy with LitePolis
The recommended way to use this package is through litepolis-cli, which manages all router and database packages for you.
LitePolis uses a packages.txt file (like requirements.txt) to declare which packages your deployment needs. The default location is ~/.litepolis/packages.txt. You can add into the packages.txt file instead of using litepolis-cli deploy.
1. Install the LitePolis CLI
pip install litepolis
2. Confirm this router is in your deployment
litepolis-router-default is included by default if you install with litepolis[default]. You can verify:
litepolis-cli deploy list-deps
If it's not listed, add it:
litepolis-cli deploy add-deps litepolis-router-default
3. Initialize configuration
litepolis-cli deploy init-config
Edit the generated config file to set your secret key and other settings:
nano ~/.litepolis/config.conf
4. Start the server
litepolis-cli deploy serve
Your Polis-compatible API will be available at http://localhost:8000/api/v3/.
You can now point any Polis frontend (e.g. the CivicTechTo/polis clients) at this URL as the backend.
Configuration
Key settings in ~/.litepolis/config.conf:
| Setting | Default | Description |
|---|---|---|
jwt_secret |
dev-secret-key |
Change this in production |
jwt_expire_hours |
168 |
Token lifetime (7 days) |
LITEPOLIS_PORT |
8000 |
Port to serve on |
Connecting a Polis Frontend
Once your LitePolis server is running, configure the Polis frontend to point to your server's address. In the CivicTechTo/polis repo, this is typically the API_URL environment variable in the client configuration.
The API base path is:
http://<your-server>:<port>/api/v3
Supported Polis API Endpoints
This router implements the full Polis v3 API:
- Auth — register, login, logout, password reset
- Users — profile read/update
- Conversations — create, list, update, open/close
- Participants — join conversations, session init
- Comments — submit, moderate, get next for voting
- Votes — agree / disagree / pass
- Invites — create and join via invite code
Note: Math/visualization endpoints (
/math/pca,/math/pca2) currently return stub data. Full clustering output requires a separate math service.
Known Limitations
- Math/PCA visualization is not yet computed (stub endpoints)
- Email notifications are not implemented
- Social/OIDC login is not yet supported
Related
- LitePolis — the core platform
- LitePolis Database Default — the default database layer
- Polis (CivicTechTo) — the frontend this router is compatible with
- Awesome LitePolis — browse available LitePolis packages
License
See LICENSE.
Metadata
Release files for litepolis-router-default 0.1.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 | |
|---|---|---|---|
| litepolis_router_default-0.1.0.tar.gz | 25.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| litepolis_router_default-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.8 kB
Release files / litepolis_router_default-0.1.0.tar.gz
| Download URL | litepolis_router_default-0.1.0.tar.gz |
|---|---|
| Size | 25.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e1fb488eb57bcf8ad6b5f73a5030701b898aacd10580802225392305eac52dea
|
|
BLAKE2b-256 checksum How to use checksums |
1be595c8fb95eb7fcdefb86b906f25ca9e4fbba4809f38f3f9f87d7c518379f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.
Transparency logRelease files / litepolis_router_default-0.1.0-py3-none-any.whl
| Download URL | litepolis_router_default-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c1e70a636d5beb2f479036c0d48d49e4954e42e1e35dfea9e70b895427470bb0
|
|
BLAKE2b-256 checksum How to use checksums |
60489c50d692a9d18efe09dc10a8dd19d0faf99c1e03371fb2d41a8d0607e2fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.
Transparency log