The python package for Revornix API.
Project description
Revornix Python Library
Python SDK and CLI for the Revornix API.
📕 API Documentation: revornix/api
Full Application
The full Revornix application is available here:
Introduction
- RoadMap: RoadMap
- Official Website: revornix.com
- Community: Discord | WeChat | QQ
Installation
Install from PyPI:
pip install revornix
Install from source for local development:
pip install -e .
Authentication
Both the Python SDK and CLI require:
base_url: your Revornix API base URLapi_key: your Revornix API key
For CLI usage, these environment variables are supported:
export REVORNIX_BASE_URL="YOUR_API_PREFIX"
export REVORNIX_API_KEY="YOUR_API_KEY"
CLI
After installation, the revornix command is available.
Show help:
revornix --help
You can pass credentials with flags:
revornix --base-url "YOUR_API_PREFIX" --api-key "YOUR_API_KEY" --help
Or use environment variables:
export REVORNIX_BASE_URL="YOUR_API_PREFIX"
export REVORNIX_API_KEY="YOUR_API_KEY"
revornix --help
CLI Quick Start
Upload a file:
revornix files upload \
--local-file-path ./tests/fixtures/test.txt \
--remote-file-path uploads/test.txt
Create a quick note document:
revornix documents create-quick-note \
--content "hello world" \
--section 1 \
--section 2 \
--label 10 \
--auto-summary
Create a website document:
revornix documents create-website \
--url https://www.google.com \
--section 1 \
--label 10
Create a file document:
revornix documents create-file \
--file-name demo.pdf \
--section 1 \
--label 10
Create an audio document:
revornix documents create-audio \
--file-name demo.mp3 \
--section 1 \
--label 10 \
--auto-transcribe
Upload a local file and create a file document in one step:
revornix documents upload-create-file \
--local-file-path ./tests/fixtures/test.txt \
--remote-file-path uploads/test.txt \
--section 1 \
--label 10
Create a document label:
revornix labels create-document-label --name research
Create a section label:
revornix labels create-section-label --name tutorial
List all document labels:
revornix labels list-document-labels
List all sections:
revornix sections list
Get document detail:
revornix documents detail --document-id 123
Search my documents:
revornix documents search-mine --keyword notes --label 10 --desc true
Run document vector search:
revornix documents search-vector --query "retrieval augmented generation"
Ask document AI and manage reading state:
revornix documents ask --document-id 123 --question "Summarize the key decisions"
revornix documents read --document-id 123 --status true
revornix documents star --document-id 123 --status true
Work with notes, task generation, and graphs:
revornix documents create-note --document-id 123 --content "Follow up next week"
revornix documents generate-graph --document-id 123
revornix documents generate-podcast --document-id 123
revornix graphs document --document-id 123
revornix graphs section --section-id 12
Create a section:
revornix sections create \
--title "AI Notes" \
--description "Knowledge base for AI" \
--process-task-trigger-type 1 \
--label 10 \
--auto-publish
Get section detail:
revornix sections detail --section-id 12
Publish a section:
revornix sections publish --section-id 12 --status true
CLI Command Reference
files
Upload a local file:
revornix files upload \
--local-file-path ./demo.txt \
--remote-file-path uploads/demo.txt \
--content-type text/plain
documents
Create a file document:
revornix documents create-file \
--file-name demo.pdf \
--title "Demo File" \
--description "Imported from uploaded file" \
--section 1 \
--label 10 \
--auto-summary
Create a website document:
revornix documents create-website \
--url https://example.com \
--title "Example Website" \
--section 1 \
--label 10 \
--auto-summary
Create a quick note document:
revornix documents create-quick-note \
--content "Meeting notes" \
--title "Meeting Notes" \
--section 1 \
--label 10
Create an audio document:
revornix documents create-audio \
--file-name call.mp3 \
--title "Customer Call" \
--section 1 \
--label 10 \
--auto-transcribe \
--auto-summary
Upload a file and create a file document in one command:
revornix documents upload-create-file \
--local-file-path ./demo.pdf \
--remote-file-path uploads/demo.pdf \
--title "Demo File" \
--section 1 \
--label 10
Upload an audio file and create an audio document in one command:
revornix documents upload-create-audio \
--local-file-path ./call.mp3 \
--remote-file-path uploads/call.mp3 \
--title "Customer Call" \
--section 1 \
--label 10 \
--auto-transcribe
Get document detail:
revornix documents detail --document-id 123
Update document metadata:
revornix documents update \
--document-id 123 \
--title "Updated Title" \
--section 1 \
--label 10
Delete documents:
revornix documents delete --document-id 123 --document-id 124
Search my documents:
revornix documents search-mine \
--keyword notes \
--label 10 \
--start 0 \
--limit 20 \
--desc true
Run document vector search:
revornix documents search-vector --query "retrieval augmented generation"
labels
List document labels:
revornix labels list-document-labels
Create a document label:
revornix labels create-document-label --name article
Create a section label:
revornix labels create-section-label --name collection
List section labels:
revornix labels list-section-labels
Delete document labels:
revornix labels delete-document-labels --label-id 10 --label-id 11
Delete section labels:
revornix labels delete-section-labels --label-id 20 --label-id 21
sections
List sections:
revornix sections list
Create a section:
revornix sections create \
--title "Weekly Digest" \
--description "Weekly curated content" \
--process-task-trigger-type 1 \
--process-task-trigger-scheduler "0 0 * * 1" \
--label 10
Get section detail:
revornix sections detail --section-id 12
List section documents:
revornix sections documents --section-id 12 --start 0 --limit 20 --desc true
Search my sections:
revornix sections search-mine --keyword digest --label 10 --desc true
Update a section:
revornix sections update \
--section-id 12 \
--title "Weekly Digest" \
--auto-podcast true \
--auto-illustration false
Delete a section:
revornix sections delete --section-id 12
Get publish status:
revornix sections get-publish --section-id 12
Publish or unpublish:
revornix sections publish --section-id 12 --status true
revornix sections publish --section-id 12 --status false
Republish:
revornix sections republish --section-id 12
CLI Notes
- Use repeated
--sectionoptions to pass multiple sections. - Use repeated
--labeloptions to pass multiple labels. --sectionand--labelexpect numeric IDs.- CLI responses are printed as JSON.
documents upload-create-fileanddocuments upload-create-audioupload the local file first, then create the corresponding document.documents search-vectorrequires the target documents to already have embeddings generated on the server side. Example:
revornix documents create-quick-note \
--content "hello" \
--section 1 \
--section 2 \
--label 10 \
--label 11
Python SDK
Create a Session
from revornix import Session
session = Session(
base_url="YOUR_API_PREFIX",
api_key="YOUR_API_KEY",
)
Import Schema Models
from revornix.schema import DocumentSchema, SectionSchema
Upload a File
from revornix import Session
session = Session(
base_url="YOUR_API_PREFIX",
api_key="YOUR_API_KEY",
)
res = session.upload_file(
local_file_path="./tests/fixtures/test.txt",
remote_file_path="uploads/test.txt",
)
Create a Document Label
from revornix import Session
from revornix.schema import DocumentSchema
session = Session(
base_url="YOUR_API_PREFIX",
api_key="YOUR_API_KEY",
)
data = DocumentSchema.LabelAddRequest(name="test")
res = session.create_document_label(data=data)
Create a Section Label
from revornix import Session
from revornix.schema import SectionSchema
session = Session(
base_url="YOUR_API_PREFIX",
api_key="YOUR_API_KEY",
)
data = SectionSchema.LabelAddRequest(name="test")
res = session.create_section_label(data=data)
Create a Section
from revornix import Session
from revornix.schema import SectionSchema
session = Session(
base_url="YOUR_API_PREFIX",
api_key="YOUR_API_KEY",
)
data = SectionSchema.SectionCreateRequest(
title="test",
description="test",
cover="test.png",
labels=[],
auto_publish=False,
auto_podcast=False,
auto_illustration=False,
process_task_trigger_type=1,
process_task_trigger_scheduler=None,
)
res = session.create_section(data=data)
Get All Document Labels
from revornix import Session
session = Session(
base_url="YOUR_API_PREFIX",
api_key="YOUR_API_KEY",
)
res = session.get_mine_all_document_labels()
Get All Sections
from revornix import Session
session = Session(
base_url="YOUR_API_PREFIX",
api_key="YOUR_API_KEY",
)
res = session.get_mine_all_sections()
Create a Quick Note Document
from revornix import Session
from revornix.schema import DocumentSchema
session = Session(
base_url="YOUR_API_PREFIX",
api_key="YOUR_API_KEY",
)
data = DocumentSchema.QuickNoteDocumentParameters(
title="Quick Note",
description="Created from SDK",
cover=None,
sections=[1, 2],
labels=[10],
content="test",
auto_summary=False,
auto_podcast=False,
auto_tag=False,
)
res = session.create_quick_note_document(data=data)
Create a Website Document
from revornix import Session
from revornix.schema import DocumentSchema
session = Session(
base_url="YOUR_API_PREFIX",
api_key="YOUR_API_KEY",
)
data = DocumentSchema.WebsiteDocumentParameters(
title="Website Import",
description="Created from URL",
cover=None,
sections=[1],
labels=[10],
url="https://www.google.com",
auto_summary=False,
auto_podcast=False,
auto_tag=False,
)
res = session.create_website_document(data=data)
Create a File Document
from revornix import Session
from revornix.schema import DocumentSchema
session = Session(
base_url="YOUR_API_PREFIX",
api_key="YOUR_API_KEY",
)
data = DocumentSchema.FileDocumentParameters(
title="File Import",
description="Created from uploaded file",
cover=None,
sections=[1],
labels=[10],
file_name="demo.pdf",
auto_summary=False,
auto_podcast=False,
auto_tag=False,
)
res = session.create_file_document(data=data)
Create an Audio Document
from revornix import Session
from revornix.schema import DocumentSchema
session = Session(
base_url="YOUR_API_PREFIX",
api_key="YOUR_API_KEY",
)
data = DocumentSchema.AudioDocumentParameters(
title="Audio Import",
description="Created from uploaded audio",
cover=None,
sections=[1],
labels=[10],
file_name="demo.mp3",
auto_summary=False,
auto_podcast=False,
auto_transcribe=True,
auto_tag=False,
)
res = session.create_audio_document(data=data)
Run Document Vector Search
from revornix import Session
from revornix.schema import DocumentSchema
session = Session(
base_url="YOUR_API_PREFIX",
api_key="YOUR_API_KEY",
)
data = DocumentSchema.VectorSearchRequest(query="retrieval augmented generation")
res = session.search_document_vector(data=data)
Delete Documents
from revornix import Session
from revornix.schema import DocumentSchema
session = Session(
base_url="YOUR_API_PREFIX",
api_key="YOUR_API_KEY",
)
data = DocumentSchema.DocumentDeleteRequest(document_ids=[123, 124])
res = session.delete_document(data=data)
Delete a Section
from revornix import Session
from revornix.schema import SectionSchema
session = Session(
base_url="YOUR_API_PREFIX",
api_key="YOUR_API_KEY",
)
data = SectionSchema.SectionDeleteRequest(section_id=12)
res = session.delete_section(data=data)
Available SDK Methods
The current Session methods are:
upload_filecreate_file_documentcreate_website_documentcreate_quick_note_documentcreate_audio_documentget_mine_all_document_labelscreate_document_labeldelete_document_labelget_document_detailask_documentcreate_document_ai_summarycreate_document_embeddingtranscribe_audio_documentgenerate_document_graphgenerate_document_podcastget_document_month_summarycreate_document_notesearch_document_notesdelete_document_notesupdate_documenttransform_document_markdowndelete_documentsearch_mine_documentssearch_unread_documentssearch_recent_documentssearch_star_documentssearch_document_vectorset_document_read_statusset_document_star_statuscreate_section_labelget_mine_all_section_labelsdelete_section_labelcreate_sectionupdate_sectiondelete_sectionget_section_detailget_section_documentsask_sectionget_mine_all_sectionssearch_mine_sectionssearch_subscribed_sectionssearch_public_sectionssearch_user_sectionsgenerate_section_podcastgenerate_section_ppttrigger_section_processretry_section_documentpublish_sectionget_section_publishrepublish_sectionsearch_graphsearch_document_graphsearch_section_graph
Development
Project layout:
src/revornix/session.py: coreSessionclient for the Revornix APIsrc/revornix/cli/: Typer CLI entrypoint, command groups, and CLI workflowssrc/revornix/schema/: Pydantic request and response modelssrc/revornix/endpoints/: API endpoint constantstests/unit/: unit tests that do not hit the real networktests/integration/: opt-in real API integration teststests/fixtures/: local files used by tests and CLI examples
Run tests:
pytest
Run CLI tests only:
pytest tests/unit/test_cli.py
Run all unit tests:
pytest tests/unit
Integration tests are opt-in and require both credentials and an explicit switch:
export REVORNIX_RUN_INTEGRATION_TESTS=true
pytest tests/integration
Contributors
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 revornix-0.2.0.tar.gz.
File metadata
- Download URL: revornix-0.2.0.tar.gz
- Upload date:
- Size: 20.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f83ba57f91fd09bffcea361761f438ab0f957957371be84225fdbd7c4e369efc
|
|
| MD5 |
207cd4787948323f356ff5d99e3993ea
|
|
| BLAKE2b-256 |
5160f5001971238d8129ec45a214743b9ed2d98bb2d6689da3b4179006318ab2
|
Provenance
The following attestation bundles were made for revornix-0.2.0.tar.gz:
Publisher:
pypi-publish.yml on Qingyon-AI/Revornix-Python-Lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
revornix-0.2.0.tar.gz -
Subject digest:
f83ba57f91fd09bffcea361761f438ab0f957957371be84225fdbd7c4e369efc - Sigstore transparency entry: 1399387914
- Sigstore integration time:
-
Permalink:
Qingyon-AI/Revornix-Python-Lib@ec16779c104b8581724304c3dfd1680fa7dbea53 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Qingyon-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@ec16779c104b8581724304c3dfd1680fa7dbea53 -
Trigger Event:
release
-
Statement type:
File details
Details for the file revornix-0.2.0-py3-none-any.whl.
File metadata
- Download URL: revornix-0.2.0-py3-none-any.whl
- Upload date:
- Size: 25.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecb65d3300532297a01d75f782b89a97d54b384a7b6020703977cca7fd0b51af
|
|
| MD5 |
b7491f3c1f88d96de736458da59ecc69
|
|
| BLAKE2b-256 |
25bac119f3add51977ce161b1a4689efef2bbb21857441723d483207ef975e8a
|
Provenance
The following attestation bundles were made for revornix-0.2.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on Qingyon-AI/Revornix-Python-Lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
revornix-0.2.0-py3-none-any.whl -
Subject digest:
ecb65d3300532297a01d75f782b89a97d54b384a7b6020703977cca7fd0b51af - Sigstore transparency entry: 1399387928
- Sigstore integration time:
-
Permalink:
Qingyon-AI/Revornix-Python-Lib@ec16779c104b8581724304c3dfd1680fa7dbea53 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Qingyon-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@ec16779c104b8581724304c3dfd1680fa7dbea53 -
Trigger Event:
release
-
Statement type: