Skip to main content

Programmatically access the Atlas RFP interface

Project description

atlas-rfp

PyPI-downloads PyPI-version PyPI-license Supported python versions

Rationale

MIT's reimbursement system is aging. Having a high-performance, statically-typed interface to the RFP system enables higher-level financial scripts and programs to be created.

This script uses touchstone-auth, another one of my Python packages that is a Python user-agent capable of properly two-factor authenticating your scripts, without requiring a browser.

Install

This package is on Pip, so you can just:

pip install atlas-rfp

Alternatively, you can get built wheels from the Releases tab on Github.

Quickstart

To perform Touchstone authentication, we need a client-side certificate. Remember to not hard-code your credentials! The example here loads credentials from a json file called credentials.json:

{
    "certfile": "some_client_credential.p12",
    "password": "horse-battery-staple-correct"
}

Then, in your Python file, you can do the following:

import json
from touchstone_auth import TouchstoneSession

with open('credentials.json') as cred_file:
    credentials = json.load(cred_file)

with TouchstoneSession(
    base_url='https://atlas.mit.edu',
    pkcs12_filename=credentials['certfile'],
    pkcs12_pass=credentials['password'],
    cookiejar_filename='cookies.pickle') as s:

    response = s.get('https://atlas.mit.edu/atlas/Main.action')

For more examples on how to authenticate, see the touchstone-auth documentation.

Complete Examples

Developer install

If you'd like to hack locally on atlas-rfp, after cloning this repository:

$ git clone https://github.com/meson800/atlas-rfp.git
$ cd git

you can create a local virtual environment, and install atlas-rfp in "development mode"

$ python -m venv env
$ .\env\Scripts\activate    (on Windows)
$ source env/bin/activate   (on Mac/Linux)
$ pip install -e .

After this 'local install', you can use and import atlas-rfp freely without having to re-install after each update.

Changelog

See the CHANGELOG for detailed changes.

## [0.1.8] - 2023-09-10
### Changed
- Added Pydantic field serializers for Money type

License

This is licensed by the MIT license. Use freely!

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

atlas-rfp-0.1.8.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

atlas_rfp-0.1.8-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file atlas-rfp-0.1.8.tar.gz.

File metadata

  • Download URL: atlas-rfp-0.1.8.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for atlas-rfp-0.1.8.tar.gz
Algorithm Hash digest
SHA256 5b41db76a2745aab34da6d80e520db2c15677b9614556649ee1ad1c4a096543e
MD5 4dd6632906c657c715325af29710080d
BLAKE2b-256 39a61ba68a286e69504f06131a8c1c49ad6b9fdf46d9e5a4c3c388a24f707c1d

See more details on using hashes here.

File details

Details for the file atlas_rfp-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: atlas_rfp-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for atlas_rfp-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 6749972f7e45d631ea335d736a846cbd65eb71c6c4b81b014e9b57542849231e
MD5 363c9f6a7a58792b03bbea5e24136fa7
BLAKE2b-256 5275b4e54d7dac81ae6dc9587f7e6aebe3cbd2432bddcd3584b2be2a07253184

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