Skip to main content
# python-cip

A very simple python interface to Canto Cumulus CIP

Wraps [requests](http://python-requests.org) to call CIP endpoints in a session


## API

### class cip.CIP

> CIP(url, serveraddress, user=None, password=None)

#### Methods:


** login(user = None, password=None, catalogname=None) **

Open a session on CIP. Returns reply from server.


** do(api, rawdata=False, ...) **

Call a `api` CIP endpoint. Returns reply from server.
If `rawdata` is False, reply is parsed JSON.

Any extra arguments are passed to request post call


** request(api, ...) **

Do a POST request to `api` CIP endpoint. Returns
[request Response object](http://docs.python-requests.org/en/master/api/#requests.Response)

Any extra arguments are passed to request post call


** logout(self) **

Close CIP session. Returns nothing


### class cip.CIPException(Exception)


## Example

```python
from cip import CIP

self.cip = CIP("http://localhost:8080/CIP/", "localhost")
self.cip.login('user', 'password', 'Sample Catalog')

r = self.cip.do("metadata/search/Sample Catalog", data={
'querystring': '"Asset Name" contains "photo"',
'field': ["ID", "Asset Name", "Asset Modification Date"],
})

print( r['items'][0]['Asset Modification Date'] )

```


## Test

```bash
$ pip install tox
$ tox
```


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-cip-0.0.4.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_cip-0.0.4-py2.py3-none-any.whl (4.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file python-cip-0.0.4.tar.gz.

File metadata

  • Download URL: python-cip-0.0.4.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for python-cip-0.0.4.tar.gz
Algorithm Hash digest
SHA256 971628e213656e6f932c1bf401824f80f03ce90e2e93b254e228076458fea49c
MD5 a56802e0d24439811672f69077815c7c
BLAKE2b-256 8496100235fecef38240db1951eeae3e3ad2f89b42d4a128a6cce921d835348a

See more details on using hashes here.

File details

Details for the file python_cip-0.0.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for python_cip-0.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 25ac09f458bf1acfe545d842e36c36365510feb75fb03153dcb6972fec59ccd4
MD5 2569e97cbe9696afbed0d72c80bfcc49
BLAKE2b-256 ecaa5c9ff6feec8ce2e8dd9d732e299a25d8c166ab1c8dc10772e9aa47c1ab7a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page