Giter Site home page Giter Site logo

kbeachler / piazza-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hfaran/piazza-api

0.0 0.0 0.0 9.33 MB

Unofficial Client for Piazza's Internal API

Home Page: https://hfaran.github.io/posts/reverse-engineering-piazzas-api/

License: MIT License

Python 99.42% Batchfile 0.36% Dockerfile 0.22%

piazza-api's Introduction

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(["[email protected]", "[email protected]"])
...

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.

piazza-api's People

Contributors

hfaran avatar blx avatar jlumbroso avatar egregori3 avatar arxanas avatar skystrife avatar camerondurham avatar davidsnider avatar j-beastman avatar asinghani avatar aparande avatar ausaf-a avatar evanj3 avatar icamacho3 avatar kk1423 avatar kavigupta avatar keagan-piazza avatar nacgarg avatar developstorm avatar vishhvak avatar savantes1 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.