Skip to main content
[![Build Status](https://travis-ci.org/puntonim/service-rabbit.svg?branch=master)](https://travis-ci.org/puntonim/service-rabbit)

# Rabbit service client

This package is service client for Rabbit API.

## Client usage

```python
# Configure settings.
import service_rabbit.conf
d = dict(
BASE_URL='http://inspire-prod-broker1.cern.ch:15672/api',
REQUEST_TIMEOUT=30,
HTTP_AUTH_USERNAME='user',
HTTP_AUTH_PASSWORD='pass',
)
service_rabbit.conf.settings.configure(**d)

# Use the client.
from service_rabbit.client import RabbitClient
client = RabbitClient()
response = client.get_queue('inspire', 'orcid_push')
response.raise_for_result()
consumers = response.get_consumers_count()
messages = response.get_messages_count()
```

## Development

```bash
# Create a venv and install the requirements:
$ make venv

# Run isort and lint:
$ make isort
$ make lint

# Run all the tests:
$ make test # tox against Python27 and Python36.
$ tox -e py27 # tox against a specific Python version.
$ pytest # pytest against the active venv.

# Run a specific test:
$ make test/tests/test_client.py # tox against Python27 and Python36.
$ tox -e py27 -- tests/test_client.py # tox against a specific Python version.
$ pytest tests/test_client.py # pytest against the active venv.
```

To publish on PyPi, first set the PyPi credentials:

```bash
# Edit .pypirc:
$ cat $HOME/.pypirc
[pypi]
username: myuser
password: mypass
```

```bash
# Edit the version in `setup_gen.py`.
# ... version=pep440_version('1.1.1'),
# Then generate setup.py with:
$ make setup.py
# Commit, tag, push:
$ git commit -m '1.1.1 release'
$ git tag 1.1.1
$ git push origin master --tags

# Finally publish:
$ make publish
```

Metadata

Release files for service-rabbit 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for service-rabbit 1.0.0
File Size Uploaded Provenance Actions
service-rabbit-1.0.0.tar.gz 4.4 kB Without provenance Details for service-rabbit-1.0.0.tar.gz

Release files / service-rabbit-1.0.0.tar.gz

Download URL service-rabbit-1.0.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0bb46d261b33f0a3b61b546db66bed971f3bea229afa310cf05aac7714a96c68
BLAKE2b-256 checksum
How to use checksums
2deaf6d64ad3bcb0865215b0c9469f40f1b6a58ab27b63eb028824891b1c3221
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.10

Security for service-rabbit 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page