Skip to main content

Cockpit CMS API Python Wrapper

Project description

Cockpit CMS API

Version: 0.1.0

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.0-py2.py3-none-any.whl (5.5 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for cockpit_api-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 83b16458efe604f8d678e2ce98196f63355ffd1261c086d5254204ca21dd175b
MD5 4e3ba6d49fe4ab0dbd0956af434101f3
BLAKE2b-256 fe634c17f4d3813ae2242caf9059c51cd931a2c987e47f8a9aff4141bfaf8db3

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