A command-line interface for Seed Services HTTP APIs
Project description
A command line interface for Seed Services HTTP APIs.
Installation
Install with:
$ pip install --user seed-services-cli
Then run:
$ seed-services-cli --help
and read the usage instructions.
Configuration
The configuration can be passed in using a YAML file. An example is provided:
hub: api_url: http://hub.example.org/api/v1 token: TEMP identity_store: api_url: http://idstore.example.org/api/v1 token: TEMP2
Then run the following to use:
$ seed-services-cli --conf=config.yaml command-to-run
Finding identities
Run:
$ seed-services-cli identity-search --help
to learn about the options available for searching.
Example search:
$ seed-services-cli identity-search --address_type msisdn --address +27001
Get identity details
Run:
$ seed-services-cli identity-get --identity uuid
to get a specific identity details dump to json
Identities Upload
Run:
$ seed-services-cli identity-import --help
to learn about the identity upload instructions.
Then to upload content create a CSV or JSON file
$ seed-services-cli identity-import --csv filename.csv
Find demo_import_identities.csv and .json in the repo route for format example.
Messages Listing and Upload
Run:
$ seed-services-cli sbm-messagesets --help
to learn about the messagesets available for uploading to.
Run:
$ seed-services-cli sbm-messages-import --help
to learn about the message upload instructions.
Then to upload content create a CSV or JSON file
$ seed-services-cli sbm-messages-import --csv filename.csv
Note: To upload binary content the file name should in the binary_content field and this will be uploaded for you.
To retrieve messages run:
$ seed-services-cli sbm-messages --help
Filters are available for message, messageset, lang and sequence_number.
Message Deletion
Run:
$ seed-services-cli sbm-messages-delete --help
to learn about deleting messages. Filters are available for message, messageset, lang and sequence_number.
Example that would purge all messages and binary files for messageset 1:
$ seed-services-cli sbm-messages-delete --messageset 1
Registration Upload to Hub
Run:
$ seed-services-cli hub-registrations-import --help
to learn about the registration upload instructions.
Then to upload content create a CSV or JSON file
$ seed-services-cli hub-registrations-import --csv filename.csv
Find demo_import_registration.csv in the repo route for format example.
Developing
Run:
$ pip install --editable .
Testing:
$ pip install -r requirements-dev.txt $ py.test seed_services_cli
Reporting issues
Issues can be filed in the GitHub issue tracker. Please don’t use the issue tracker for general support queries.
Release Notes
0.0.4 - 29-June-2016 - Added hub-registrations-import
0.0.3 - 29-June-2016 - Added identity-get and identity-import.
0.0.2 - 28-June-2016 - Added sbm-messages-delete. Renamed short param from m to ms for messageset for sbm-messages command for consistency.
0.0.1 - Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file seed-services-cli-0.0.4.tar.gz
.
File metadata
- Download URL: seed-services-cli-0.0.4.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6c8e2855a21f5ef890355d43e6bd8dd877a123589b995a84d490f1fdf46ed69 |
|
MD5 | a8973d76a0a93783b96e3aca0ba5f6ea |
|
BLAKE2b-256 | 8bc19105b0a6a4f202c2f0a81b65702b51489cd27bb09cfeba71295e02e2a091 |
File details
Details for the file seed_services_cli-0.0.4-py2.7.egg
.
File metadata
- Download URL: seed_services_cli-0.0.4-py2.7.egg
- Upload date:
- Size: 28.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a075e003de7c0062c2b2c97db9177efc58c2421a9b2847e4584d72693fd719b |
|
MD5 | d4e6dc08232b73b02ec85bae7826490c |
|
BLAKE2b-256 | 014ec2cdbc9519e2bf67624fee4c898f661487b7d563669eb54eed2e09d236a2 |