LitePolis router module implementing ParticiAPI specification
Project description
LitePolis-router-particiapi
ParticiAPI-compatible router module for LitePolis.
Overview
This module implements the ParticiAPI specification, providing a simpler alternative API for the ParticiApp frontend. It works alongside LitePolis-router-default (Polis API) and can be used interchangeably.
Installation
litepolis-cli deploy add-deps litepolis-router-particiapi
litepolis-cli deploy sync-deps
Configuration
This module exports default configuration. To customize, create a config file:
litepolis-cli deploy init-config
Then edit ~/.litepolis/litepolis.config:
[litepolis_router_particiapi]
session_secret = your-secure-secret-key-here
csrf_token_expire_hours = 24
ParticiAPI Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/session |
POST | Create/refresh session |
/api/conversations/{id} |
GET | Get conversation |
/api/conversations/{id}/results/ |
GET | Get results (consensus/repness) |
/api/conversations/{id}/statements/ |
GET | Get all statements |
/api/conversations/{id}/statements/ |
POST | Submit new statement |
/api/conversations/{id}/participant |
GET | Get participant info |
/api/conversations/{id}/participant/notifications |
GET | Get notification settings |
/api/conversations/{id}/participant/notifications |
PUT | Set notification settings |
/api/conversations/{id}/votes/{tid} |
PUT | Submit vote |
Key Differences from Polis API
- Endpoint Structure:
/api/prefix vs/api/v3/ - Session Auth: Cookie-based sessions with CSRF tokens
- Error Format: RFC 7807 Problem+JSON responses
- Vote Values: AGREE=-1, NEUTRAL=0, DISAGREE=1 (inverted from Polis)
- Response Format: Direct JSON objects vs PolisResponse wrapper
Quick Start
- Install all ParticiAPI modules:
litepolis-cli deploy add-deps litepolis-database-particiapi
litepolis-cli deploy add-deps litepolis-router-particiapi
litepolis-cli deploy add-deps litepolis-ui-particiapp
litepolis-cli deploy sync-deps
- Start LitePolis server:
litepolis-cli deploy serve
Development Testing
pip install -e .
pytest tests/
Project details
Release history Release notifications | RSS feed
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_router_particiapi-0.1.1.tar.gz.
File metadata
- Download URL: litepolis_router_particiapi-0.1.1.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b7858222cc5f14577fcbdca7641ab9b5cc5896ae88b951b16b491ad464a3579
|
|
| MD5 |
eab5f0d3b470163efb574797d5899037
|
|
| BLAKE2b-256 |
28b935a2ca7ba29260a01bf76785c7e48cacd36b44f9aa817272624f6566bcc5
|
Provenance
The following attestation bundles were made for litepolis_router_particiapi-0.1.1.tar.gz:
Publisher:
python-publish.yml on NewJerseyStyle/LitePolis-router-particiapi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
litepolis_router_particiapi-0.1.1.tar.gz -
Subject digest:
7b7858222cc5f14577fcbdca7641ab9b5cc5896ae88b951b16b491ad464a3579 - Sigstore transparency entry: 1171841112
- Sigstore integration time:
-
Permalink:
NewJerseyStyle/LitePolis-router-particiapi@1f7aa566f803d96ba410196961fa0307dd44cebd -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/NewJerseyStyle
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@1f7aa566f803d96ba410196961fa0307dd44cebd -
Trigger Event:
release
-
Statement type:
File details
Details for the file litepolis_router_particiapi-0.1.1-py3-none-any.whl.
File metadata
- Download URL: litepolis_router_particiapi-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.9 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 |
470fae993464a58c3c9e81c62f3f01c77918518d62fe409e138934ecaa0ce28a
|
|
| MD5 |
d5f1b8bb6697ce1c0813cd6a2ce750a8
|
|
| BLAKE2b-256 |
8f9c19c62776b27c96b77043accd4ac6642501a0c95fe3de81dc4b8b62c62870
|
Provenance
The following attestation bundles were made for litepolis_router_particiapi-0.1.1-py3-none-any.whl:
Publisher:
python-publish.yml on NewJerseyStyle/LitePolis-router-particiapi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
litepolis_router_particiapi-0.1.1-py3-none-any.whl -
Subject digest:
470fae993464a58c3c9e81c62f3f01c77918518d62fe409e138934ecaa0ce28a - Sigstore transparency entry: 1171841115
- Sigstore integration time:
-
Permalink:
NewJerseyStyle/LitePolis-router-particiapi@1f7aa566f803d96ba410196961fa0307dd44cebd -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/NewJerseyStyle
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@1f7aa566f803d96ba410196961fa0307dd44cebd -
Trigger Event:
release
-
Statement type: