Skip to main content

A simple function for setting up scratch HTTP sessions.

Project description

scratchsession

The easy way to set up scratch session objects.

scratchsession allows you to set up a scratch HTTP session the right way. With just a single function, you never have to worry about unnecesary parsing times or bad request order. It does not use any RegEx or read HTML—just pure requests!

Installing / Using

scratchsession can be installed via PyPI:

python -m pip install scratchsession

It can also just be copy/pasted into your own code. Make sure to copy all of the prepare_session function and import requests if you do this!

Example

from scratchsession import prepare_session

session = prepare_session("your_username_here", "your_password_here")

# Print your account navigation info:
resp = session.get("https://scratch.mit.edu/fragment/account-nav.json")
print(resp.text)

Questions? Ask here:

  • Nothing here yet!
  • Still nothing :(

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

scratchsession-1.0.0.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

scratchsession-1.0.0-py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 3

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