Skip to main content

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.

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.16.0.tar.gz (14.1 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.16.0-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: piazza_api-0.16.0.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for piazza_api-0.16.0.tar.gz
Algorithm Hash digest
SHA256 eff1eca6030abd9665c41919a498500b9b2461f79daae79fc4ec117d01002822
MD5 b487a6177849021c036f7227a4728731
BLAKE2b-256 ebbf896cc7855413852989d162d9908a774c125322f26f4172713b59ad49da21

See more details on using hashes here.

File details

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

File metadata

  • Download URL: piazza_api-0.16.0-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for piazza_api-0.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c1deab797adc3706c3943f2708912a88813172690e3217de41773cf0af12b88
MD5 e54a787f93a7f4d128c9659b2caded0e
BLAKE2b-256 d53645c901cb5261e5eb0e5bc85f25cd5cc1dc508244c1fc857746e3bedcc58d

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