Ortus CMS integration for Flask applications
Project description
Ortus Flask Integration
Ortus CMS integration package for Flask applications to enable:
- Webhook receiving for blog sync from Ortus CMS
- Authenticated API for Ortus to fetch blogs
- EditorJS data support
Installation
pip install ortus-flask
Usage
1. Initialize in your Flask app
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from ortus_flask import init_ortus
import os
from dotenv import load_dotenv
load_dotenv() # Loads ORTUS_WEBHOOK_SECRET and ORTUS_API_KEY
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///yourapp.db'
db = SQLAlchemy(app)
migrate = Migrate(app, db)
# Import your Blog model
from models import Blog
# Initialize Ortus integration
app.config['ORTUS_WEBHOOK_SECRET'] = os.getenv('ORTUS_WEBHOOK_SECRET')
app.config['ORTUS_API_KEY'] = os.getenv('ORTUS_API_KEY')
init_ortus(app, db, Blog)
3. Add to your .env
ORTUS_WEBHOOK_SECRET=your_webhook_secret
ORTUS_API_KEY=your_api_key
API Endpoints
After integration, these endpoints are available:
POST /api/webhook/blog- Receive blogs from OrtusGET /api/webhook/config- Get webhook configurationGET /api/sites/1/blogs- Fetch all blogs (authenticated)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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 ortus_flask-0.1.6-py3-none-any.whl.
File metadata
- Download URL: ortus_flask-0.1.6-py3-none-any.whl
- Upload date:
- Size: 19.2 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 |
a1a155d89c6936c1ec49be18ccac57c819b24be9c2dde6901bf7c01b984b0c9d
|
|
| MD5 |
91809bed192cdc02ae117d8e94a868b0
|
|
| BLAKE2b-256 |
5d0b14d12916bd3482270ac9b03a689d07c43f6cf06fb94461865124922e78a5
|
Provenance
The following attestation bundles were made for ortus_flask-0.1.6-py3-none-any.whl:
Publisher:
pypi-publish.yml on AyushDocs/ortus-flask
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ortus_flask-0.1.6-py3-none-any.whl -
Subject digest:
a1a155d89c6936c1ec49be18ccac57c819b24be9c2dde6901bf7c01b984b0c9d - Sigstore transparency entry: 1362784406
- Sigstore integration time:
-
Permalink:
AyushDocs/ortus-flask@c0a6c697af6d498e5d941e79c836d5bc4c05f27c -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/AyushDocs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@c0a6c697af6d498e5d941e79c836d5bc4c05f27c -
Trigger Event:
push
-
Statement type: