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 hashes)

Uploaded Python 2 Python 3

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