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.

Metadata

Release files for piazza-api 0.16.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for piazza-api 0.16.0
File Size Uploaded
piazza_api-0.16.0.tar.gz 14.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for piazza-api 0.16.0
File Interpreter ABI Platform
piazza_api-0.16.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.9 kB

Release files / piazza_api-0.16.0.tar.gz

Download URL piazza_api-0.16.0.tar.gz
Size 14.1 kB
Tags Source
SHA-256 checksum
How to use checksums
eff1eca6030abd9665c41919a498500b9b2461f79daae79fc4ec117d01002822
BLAKE2b-256 checksum
How to use checksums
ebbf896cc7855413852989d162d9908a774c125322f26f4172713b59ad49da21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / piazza_api-0.16.0-py3-none-any.whl

Download URL piazza_api-0.16.0-py3-none-any.whl
Size 14.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c1deab797adc3706c3943f2708912a88813172690e3217de41773cf0af12b88
BLAKE2b-256 checksum
How to use checksums
d53645c901cb5261e5eb0e5bc85f25cd5cc1dc508244c1fc857746e3bedcc58d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release history Release notifications | RSS feed

This release

0.16.0 This release

2 release files

0.15.0

2 release files

0.14.3

2 release files

0.14.0

2 release files

0.13.1

2 release files

0.12.0

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.0

3 release files

0.7.0

1 release file

0.6.0

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.1

1 release file

0.4.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page