FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 0c6f7efa authored by Monty Dawson's avatar Monty Dawson :coffee:
Browse files

Initial work on readme and licence

parent e359f4ae
No related branches found
No related tags found
1 merge request!3Add readme and increase test coverage
.git
venv/
.venv/
*.pyc
__pycache__/
.pytest_cache/
.coverage
.tox/
htmlcov/
dist/
build/
*.egg-info/
verify_export/
*.yml
*.csv
\ No newline at end of file
LICENCE 0 → 100644
MIT License
Copyright (c) 2021 University of Cambridge Information Services
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# Card Client
The Card Client is a command-line tool to allow access and export of data from the Card API.
The Card API exposes data related to university cards, but has no knowledge of institution or group
membership and does not store any personal information related to the people who hold cards.
Therefore this tool uses [Lookup](https://www.lookup.cam.ac.uk/) to allow cards to be queried
by institution or group, and to include basic information about the card holder (currently limited
to name).
For information about the data that can be retrieved from the Card API refer to the API docs
(`TODO: add link to API docs once published`).
## Installation
The command-line tool can be installed directly from the git repository:
```bash
$ pip3 install git+https://gitlab.developers.cam.ac.uk/uis/devops/iam/card-database/card-client.git
```
Alternatively, it can be run using Docker:
```bash
$ docker run registry.gitlab.developers.cam.ac.uk/uis/devops/iam/card-database/card-client/master:latest
```
For developers, the script can be installed from a cloned repo using pip:
```bash
$ cd /path/to/this/repo
$ pip3 install -e .
```
## Usage
The tool offers a single command `cardclient export` which can be used to export data from the
Card API in csv format.
A range of configuration options can be set using yaml configuration files which can be provided
using the `--config` or `-c` flags. Multiple configuration files can be provided if necessary, i.e:
```bash
$ card-client export -c ./configuration.yaml -c ./lookup-credentials.yaml
```
### Configuration options
An annotated example of the config format is available under
[config.example.yml](config.example.yml), but the following description gives more context on the
options available.
\ No newline at end of file
# TODO - annotate this better
environment:
base_url: http://localhost:8000
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment