Skip to main content

A distributed Celery application to export time-domain data periodically from Microsoft Graph API into a buffer key-value store.

Project description

MsGraphExporter

Python 3.6+ Code style: black License: MIT ReadTheDocs Build Status

MsGraphExporter is an application that performs periodic export of time-domain data like Azure AD user signins from Microsoft Graph API into a buffer key-value store (currently supports Redis) for subsequent processing. It uses Celery task queue for parallel processing, gevent greenlets for concurrent uploads, relies on the Graph API pagination to control memory footprint and respects Graph API throttling. The application could be deployed as a single-container worker or as a set of multiple queue-specific workers for high reliability and throughput.

Getting Started

Follow these instructions to use the application.

Installing

MsGraphExporter is distributed through the Python Package Index as ms-graph-exporter. Run the following command to:

  • install a specific version

    pip install "ms-graph-exporter==0.1"
    
  • install the latest version

    pip install "ms-graph-exporter"
    
  • upgrade to the latest version

    pip install --upgrade "ms-graph-exporter"
    
  • install optional DEV dependencies like pytest framework and plugins necessary for performance and functional testing

    pip install "ms-graph-exporter[test]"
    

MsGraphExporter is also distributed as the Alpine-based docker container and published on Docker Hub as undp/ms-graph-exporter.

Service Principal credentials with correct access rights to Graph API must be defined for docker/docker-compose.yamlexample deployment to work. Following .env file should be placed at the root of the project folder, or following ENV variables defined in other way:

GRAPH_CLIENT_ID=<clientId>
GRAPH_CLIENT_SECRET=<clientSecret>
GRAPH_TENANT=<tenant>

Then, docker deployment could be initiated with:

docker-compose --file docker/docker-compose.yaml up

Requirements

  • Python >= 3.6

Built using

Versioning

We use Semantic Versioning Specification as a version numbering convention.

Release History

For the available versions, see the tags on this repository. Specific changes for each version are documented in CHANGELOG.md.

Also, conventions for git commit messages are documented in CONTRIBUTING.md.

Authors

  • Oleksiy Kuzmenko - OK-UNDP@GitHub - Initial design and implementation

Acknowledgments

  • Hat tip to all individuals shaping design of this project by sharing their knowledge in articles, blogs and forums.

License

Unless otherwise stated, all authors (see commit logs) release their work under the MIT License. See LICENSE.md for details.

Contributing

There are plenty of ways you could contribute to this project. Feel free to:

  • submit bug reports and feature requests
  • outline, fix and expand documentation
  • peer-review bug reports and pull requests
  • implement new features or fix bugs

See CONTRIBUTING.md for details on code formatting, linting and testing frameworks used by this project.

Project details


Download files

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

Source Distribution

ms-graph-exporter-0.1.0rc4.tar.gz (33.8 kB view details)

Uploaded Source

Built Distribution

ms_graph_exporter-0.1.0rc4-py3-none-any.whl (49.9 kB view details)

Uploaded Python 3

File details

Details for the file ms-graph-exporter-0.1.0rc4.tar.gz.

File metadata

  • Download URL: ms-graph-exporter-0.1.0rc4.tar.gz
  • Upload date:
  • Size: 33.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.17 CPython/3.6.9 Linux/4.15.0-1059-azure

File hashes

Hashes for ms-graph-exporter-0.1.0rc4.tar.gz
Algorithm Hash digest
SHA256 b925ae03d1fb90162cb5408c31952254d841f2ea87eb7bd68e601f806bb602d9
MD5 e6e798e0b6c04de550dbae179ff4301c
BLAKE2b-256 49b0488966933e2e520acc6db82de54a62d3ea22c0bb134d4c9075e8dd9ef8ec

See more details on using hashes here.

File details

Details for the file ms_graph_exporter-0.1.0rc4-py3-none-any.whl.

File metadata

File hashes

Hashes for ms_graph_exporter-0.1.0rc4-py3-none-any.whl
Algorithm Hash digest
SHA256 c4e801850768a47815e0057dc7becc31f42a4c00f6f88cbdc8ffb41340920260
MD5 6e173bfe1196b2409581ace41f568ee1
BLAKE2b-256 a96d7e1d06471dca3e74b1e0a76d44100b6e0b363f628a8f705b23003747e5a6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page