
Currently the client is not working at all on Python 3 when it uses Keystone authentication, and no project id is specified by user. It is because in this case the client prepares a request with 'X-Project-Id' header assigned to {} (empty dictionary) value. The Python 3 standard HTTP library expects all passed headers to be strings and fails when one of the headers is dictionary: File "/usr/lib/python3.4/http/client.py", line 1069, in putheader value = b'\r\n\t'.join(values) TypeError: sequence item 0: expected bytes, bytearray, or an object with the buffer interface, dict found This patch solves the problem by making the client not add 'X-Project-Id' to request at all in this case. Change-Id: I7296b08d273b7173a9f6deb0ae9fb6ff929366db Closes-Bug: 1525973
Python Zaqar Client
- version
-
0.1.0
- Wiki
- Launchpad
- Review
- Design
- IRC
-
#openstack-zaqar @ freenode
Welcome to the Zaqar Python Client project!
Table of Contents
Installation
The latest stable release can be installed from PyPI:
pip install --upgrade python-zaqarclient
For the adventurous, you may also install the latest code directly from GitHub:
pip install git+https://github.com/openstack/python-zaqarclient.git
What's in the box
By installing python-zaqarclient you get programmatic access to the Zaqar v1.0 API library. Plus, it installs a plugin to python-openstackclient that allows you to perform simple queue operations.
How to use
Python client
Details about design, features, usage and workflow can be found in the Python Client Wiki.
Command line interface
Zaqar bases its client implementation in the OpenStack Client. It can be installed and configured by following the instructions in Getting Started and Configuration in the OpenStack Client readme respectively.
The CLI currently allows creation, removal and listing of queues. Some examples are:
$ openstack queue list --limit 3
$ openstack queue create myqueue
$ openstack queue delete myqueue
Contributing
Be sure to reference the HACKING file for details on coding style. You may also wish to read through Zaqar's Contributor Guide before contributing your first patch.