Skip to main content

Unofficial Client for Piazza's Internal API

Project description

piazza-api

PyPI version

Unofficial Client for Piazza's Internal API

Usage

>>> from piazza_api import Piazza
>>> p = Piazza()
>>> p.user_login()
Email: ...
Password: ...

>>> user_profile = p.get_user_profile()

>>> eece210 = p.network("hl5qm84dl4t3x2")

>>> eece210.get_post(100)
...

>>> posts = eece210.iter_all_posts(limit=10)
>>> for post in posts:
...     do_awesome_thing(post)

>>> users = eece210.get_users(["userid1", "userid2"])
>>> all_users = eece210.get_all_users()

Above are some examples to get started; more in the documentation (which is coming soon; but the code is all Sphinx-style documented and is fairly readable).

You can also use the "internal" PiazzaRPC class which maps more directly to Piazza's API itself but is not as nice and as intuitive to use as the Piazza class abstraction.

>>> from piazza_api.rpc import PiazzaRPC
>>> p = PiazzaRPC("hl5qm84dl4t3x2")
>>> p.user_login()
Email: ...
Password: ...
>>> p.content_get(181)
...
>>> p.add_students(["student@example.com", "anotherStudent@example.com"])
...

Installation

You've seen this before and you'll see it again.

# The easy way
pip install piazza-api
# The developer way
git clone https://github.com/hfaran/piazza-api
cd piazza-api
python setup.py develop
# The Docker way
git clone https://github.com/hfaran/piazza-api
cd piazza-api
docker build -t piazza-api .
docker run -it piazza-api:latest

Contribute

License

This project is licensed under the MIT License.

Disclaimer

This is not an official API. I am not affiliated with Piazza Technologies Inc. in any way, and am not responsible for any damage that could be done with it. Use it at your own risk.

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

piazza_api-0.15.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

piazza_api-0.15.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file piazza_api-0.15.0.tar.gz.

File metadata

  • Download URL: piazza_api-0.15.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for piazza_api-0.15.0.tar.gz
Algorithm Hash digest
SHA256 e8a9a43681bc7a777e71e38b32611151281498a48064beb31a0218327eac57d0
MD5 db7cf4a9dbb8c4016b4c57aa4d3b767d
BLAKE2b-256 14903107ccc1c070e25c29a5e217a129b3efb5c2f3a015115fff166d553d2a61

See more details on using hashes here.

File details

Details for the file piazza_api-0.15.0-py3-none-any.whl.

File metadata

  • Download URL: piazza_api-0.15.0-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for piazza_api-0.15.0-py3-none-any.whl
Algorithm Hash digest
SHA256 902ae2334df27ffe67ce791897bd93c65cd78a21c4467688ecb4105c932db8cc
MD5 36fce27388ab7e072cb7b7d392c7e6f0
BLAKE2b-256 7f8b6c334e6659e1d29b1c8770295fd07f45a72cccf79beba5917a4633fa44a0

See more details on using hashes here.

Supported by

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