A remote CLI and Python client SDK for Mezzanine REST API.
Project description
# Mezzanine API Client
[](https://pypi.python.org/pypi/mezzanine-client)
[](https://pypi.python.org/pypi/mezzanine-client)
[](https://gitter.im/gcushen/mezzanine-api?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
A remote CLI and Python client SDK for [Mezzanine API](http://gcushen.github.io/mezzanine-api/).
It enables a user or service to remotely read or write to [Mezzanine CMS](http://mezzanine.jupo.org/) using Python or the command line. For example, you can write an article in Markdown on your laptop and type a simple command to automatically upload it and create a new blog post from it on your website.
# Installation
mezzanine-cli config api_url http://127.0.0.1:8000/api
mezzanine-cli config client_secret secret
```
You can also see your current configuration and available options by issuing the `mezzanine-cli config` command without any arguments. Note that the `refresh_token` setting should not be altered.
## Getting started
Some examples:
```
# List all posts (most recent first).
mezzanine-cli posts get 2
# Create a post from a Markdown file.
mezzanine-cli
# View available options for creating posts.
mezzanine-cli logout
# SDK Documentation
[SDK Documentation Website](http://gcushen.github.io/mezzanine-api/client/)
Example code to display recent blog posts:
```python
from mezzanine_client import Mezzanine
api = Mezzanine( 'app_id', 'app_secret' )
# Recent posts
published_posts = api.get_posts(offset=0, limit=10)
for post in published_posts:
print('{} (ID: {})'.format(post['title'], post['id']))
```
Further examples, such as for creating, listing, and retrieving blog posts, can be found in the [*examples*](https://github.com/gcushen/mezzanine-client-python/tree/master/examples) directory.
# Community
Join us in the [Mezzanine API chat room](https://gitter.im/gcushen/mezzanine-api?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) or leave a message and we will try to get back to you.
Feel free to [star](https://github.com/gcushen/mezzanine-client-python/) Mezzanine Client on Github to show your support and monitor updates.
Please file a [ticket](https://github.com/gcushen/mezzanine-client-python/issues) or contribute a pull request on GitHub for bugs or feature requests.
# License
Licensed under the [ISC License](https://github.com/gcushen/mezzanine-client-python/blob/master/LICENSE).
Created by [George Cushen](https://twitter.com/GeorgeCushen).
[](https://pypi.python.org/pypi/mezzanine-client)
[](https://pypi.python.org/pypi/mezzanine-client)
[](https://gitter.im/gcushen/mezzanine-api?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
A remote CLI and Python client SDK for [Mezzanine API](http://gcushen.github.io/mezzanine-api/).
It enables a user or service to remotely read or write to [Mezzanine CMS](http://mezzanine.jupo.org/) using Python or the command line. For example, you can write an article in Markdown on your laptop and type a simple command to automatically upload it and create a new blog post from it on your website.
# Installation
```
You can also see your current configuration and available options by issuing the `mezzanine-cli config` command without any arguments. Note that the `refresh_token` setting should not be altered.
## Getting started
Some examples:
```
# List all posts (most recent first).
# Create a post from a Markdown file.
# View available options for creating posts.
# SDK Documentation
[SDK Documentation Website](http://gcushen.github.io/mezzanine-api/client/)
Example code to display recent blog posts:
```python
from mezzanine_client import Mezzanine
api = Mezzanine( 'app_id', 'app_secret' )
# Recent posts
published_posts = api.get_posts(offset=0, limit=10)
for post in published_posts:
print('{} (ID: {})'.format(post['title'], post['id']))
```
Further examples, such as for creating, listing, and retrieving blog posts, can be found in the [*examples*](https://github.com/gcushen/mezzanine-client-python/tree/master/examples) directory.
# Community
Join us in the [Mezzanine API chat room](https://gitter.im/gcushen/mezzanine-api?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) or leave a message and we will try to get back to you.
Feel free to [star](https://github.com/gcushen/mezzanine-client-python/) Mezzanine Client on Github to show your support and monitor updates.
Please file a [ticket](https://github.com/gcushen/mezzanine-client-python/issues) or contribute a pull request on GitHub for bugs or feature requests.
# License
Licensed under the [ISC License](https://github.com/gcushen/mezzanine-client-python/blob/master/LICENSE).
Created by [George Cushen](https://twitter.com/GeorgeCushen).