Providing a unified (well-documented) API to the Scouts' national membership system, Compass.
Project description
Compass Interface — the unofficial Compass API
The Compass Interface project aims to provide a unified and well-documented API to the Scouts' national membership system, Compass.
Notice
This is not an official API to Compass and as such should be used in a way that doesn't cause a high request load on the Compass system.
Please also remember your personal data handling obligations (under both GDPR and Scouting policies) whilst using this system.
Objectives
The project aims to:
- increase flexibility and simplicity when developing applications that interface with Compass data,
- provide stability and abstract complexities of Compass, and
- enable greater support to our adult volunteers and members.
Where to get it
The source code for the project is hosted on GitHub at the-scouts/compass-interface
The project can be installed through either pip
or conda
.
# conda
conda env create
conda activate compass-interface
If installing dependencies from PyPI, please strongly consider using a virtual environment to isolate your packages.
# or PyPI
pip install -r requirements.txt
Dependencies
- compass - Core Compass Interface, with parsing and validation logic
- pandas - for data management and transformation
- numba - to speed things up
- pyarrow - to process and move data fast
- FastAPI - for an intuitive API
- uvicorn - serving on the lightning-fast ASGI server
Dev-dependencies
We use black
, isort
, ipython
and others to speed up the development
process!
Licence
Compass Interface is naturally open source and is licensed under the MIT license.
Usage
Running the API
To run the API either run uvicorn compass.api.app:app --reload
in the
root directory, or run the app.py file in the /compass/api/
directory. This
second method also enables interactive debugging.
Alternativley, use Docker
Running the Compass Interface files directly
To run the Compass Interface files directly the top-level script.py file is useful for getting started immediately. Please make sure not to commit credentials to git, as these are assumed public as soon as they are on GitHub.
Docker
To start docker compose, run docker-compose up -d
.
To stop docker, run docker-compose down
.
To rebuild the app, run docker-compose build --no-cache backend
.
To access an interative shell, run docker run -it backend bash
.
When the containers are running, Redis Insight is available at localhost:8001, the FastAPI app is reached at localhost:8888, and the Traefik reverse proxy is localhost:80 for the app proxy and localhost:8080 for Traefik's dashboard.
Support
For support please contact Adam Turner (@AA-Turner). There is a wider
community of interest on the UK Scouts IT Lab
group.
Ideas, Bugs, Features
Please use GitHub issues / Pull Requests to note bugs or feature requests.
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 compass-interface-0.22.1.tar.gz
.
File metadata
- Download URL: compass-interface-0.22.1.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bafb5da507d3b2886a9d56c25ffade9dfb477b4cd6e06b3e259b78f048c0b68 |
|
MD5 | 5c5a80d7902fd4b5febeffa47a379833 |
|
BLAKE2b-256 | 87ec9b1c545a6cb873a4ab38b6a48acb2e17515b85c32674b15583e7d26f1ade |
File details
Details for the file compass_interface-0.22.1-py3-none-any.whl
.
File metadata
- Download URL: compass_interface-0.22.1-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd01d9c61d0c2c0561480639666065f7f4bedba9e20902d3eed2da7d2e41def9 |
|
MD5 | 6e433c91e9d80077cda9022547c852e7 |
|
BLAKE2b-256 | 4a075293ff0610b1cb7ae4b81cae37bd65ab17c458a206e59d85e75044a1f9dc |