Skip to main content

Cockpit CMS API Python Wrapper

Project description

Cockpit CMS API

Version: 0.1.2

Cockpit CMS API Python Wrapper

Includes standard Cockpit API Calls

This repository is actively maintained and will continue adding more API calls

API Calls:

  • Get Content
  • Add/Update Content
  • Get Asset
  • Get Image Asset

Usage:

#!/usr/bin/python
# coding: utf-8
import cockpit_api

token = "<TOKEN>"
api_url = "<COCKPIT API URL>"
client = cockpit_api.Api(url=api_url, token=token)

content = client.get_content(model="<COLLECTION/SINGLETON>")
print(content)

Build Instructions

Build Python Package

sudo chmod +x ./*.py
pip install .
python setup.py bdist_wheel --universal
# Test Pypi
twine upload --repository-url https://test.pypi.org/legacy/ dist/* --verbose -u "Username" -p "Password"
# Prod Pypi
twine upload dist/* --verbose -u "Username" -p "Password"

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

cockpit_api-0.1.2-py2.py3-none-any.whl (5.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file cockpit_api-0.1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for cockpit_api-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5268796b3aaf4a24dbaa82599cf9948644b57d103b5c578c8061f3251f8c259b
MD5 a28df9a4992d0e46cb5579c05e55b1e4
BLAKE2b-256 7d1607773a25f9928bb28e88814517d5eb8bb5edf9cc95a1586f00182b823acc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page