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.14.3.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

piazza_api-0.14.3-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: piazza_api-0.14.3.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for piazza_api-0.14.3.tar.gz
Algorithm Hash digest
SHA256 fba81f08151e9349837ab12e547fcb987fa09933f68ef1ef8c1833a39a5f2bc3
MD5 04414e16b94fb4bd499e19c76f62965d
BLAKE2b-256 45b4d1bfe8700a711251c620fac05e72bcae5bdc907d18adaab055461a74b1d2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: piazza_api-0.14.3-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for piazza_api-0.14.3-py3-none-any.whl
Algorithm Hash digest
SHA256 18b8e906c8c0919a81ef2723a62be13df72d357efe929c17108bf7b4532bd051
MD5 0388648086dc8975e3f7626dd139045d
BLAKE2b-256 02a8cadbdcab205971c260bf95f8585c9365485d604603990c678038bf5ddee0

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