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"
Legacy aliases are also supported for compatibility:
export REVORNIX_URL_PREFIX="YOUR_API_PREFIX"
export 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/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
Create a document label:
revornix labels create-document --name research
Create a section label:
revornix labels create-section --name tutorial
List all document labels:
revornix labels list-document
List all sections:
revornix sections list
Create a section:
revornix sections create \
--title "AI Notes" \
--description "Knowledge base for AI" \
--process-task-trigger-type 1 \
--label 10 \
--auto-publish
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
labels
List document labels:
revornix labels list-document
Create a document label:
revornix labels create-document --name article
Create a section label:
revornix labels create-section --name collection
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
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.
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/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)
Available SDK Methods
The current Session methods are:
upload_filecreate_file_documentcreate_website_documentcreate_quick_note_documentcreate_audio_documentget_mine_all_document_labelscreate_document_labelcreate_section_labelcreate_sectionget_mine_all_sections
Development
Run tests:
pytest
Run CLI tests only:
pytest tests/test_cli.py
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.1.0.tar.gz.
File metadata
- Download URL: revornix-0.1.0.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c618244bae55341c8b27dda6ec9f78f23b04999c041a1be0e70615c4c2c895a2
|
|
| MD5 |
b5e981898904964e26a8f38cf6579ce0
|
|
| BLAKE2b-256 |
67b238d2a02ae63dc042588207a13955da91ec98a105d06d6c3476b8b9a8fb21
|
Provenance
The following attestation bundles were made for revornix-0.1.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.1.0.tar.gz -
Subject digest:
c618244bae55341c8b27dda6ec9f78f23b04999c041a1be0e70615c4c2c895a2 - Sigstore transparency entry: 1184599505
- Sigstore integration time:
-
Permalink:
Qingyon-AI/Revornix-Python-Lib@c7bb96abbdd2fe42f9cbca0dce05354afc790ab1 -
Branch / Tag:
refs/tags/v0.1.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@c7bb96abbdd2fe42f9cbca0dce05354afc790ab1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file revornix-0.1.0-py3-none-any.whl.
File metadata
- Download URL: revornix-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.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 |
2432bb73535f82d5f10cbcde151a695ffb42594f152cc0f9398979cb5ee5a1f8
|
|
| MD5 |
1c0c5a921eb8e16f0768155bf14ebc00
|
|
| BLAKE2b-256 |
d4b49bfd3975a205bcd543e2eeba19398a18b0f84ef96c5b1d363ab30a1dfdb8
|
Provenance
The following attestation bundles were made for revornix-0.1.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.1.0-py3-none-any.whl -
Subject digest:
2432bb73535f82d5f10cbcde151a695ffb42594f152cc0f9398979cb5ee5a1f8 - Sigstore transparency entry: 1184599560
- Sigstore integration time:
-
Permalink:
Qingyon-AI/Revornix-Python-Lib@c7bb96abbdd2fe42f9cbca0dce05354afc790ab1 -
Branch / Tag:
refs/tags/v0.1.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@c7bb96abbdd2fe42f9cbca0dce05354afc790ab1 -
Trigger Event:
release
-
Statement type: