Package: pypowerschool
PyPowerSchool is a basic Python wrapper for synchronous communication with the PowerSchool API. The goal is to simplify the process of communicating with thePowerSchool Student Information SystemAPI by handling authentication and decoding, allowing you to focus on using the data, not retrieving it.PyPowerSchool is not endorsed, sponsored, or affilitated with PowerSchool in any way.Table of ContentsPowerSchool PluginUsagePowerQueriesContributingLicensePowerSchool PluginBefore using PyPowerSchool, you will need to create and install a data access plugin on your PowerSchool server. Information about creating the plugin file can be found on thePowerSchool Developer Supportsite. We have created an example plugin (PSDataAccessCorePlugin) that you can use as is, or modify as you see fit. Once you have installed the plugin, you will be provided a client ID and client secret that you will use for authenticating with the PowerSchool server.UsageBegin by installing the PyPowerSchool module, usingpip.pipinstallpypowerschoolIn your code, simply import the PyPowerSchool module and instantiate a new client object. The constructor requires three arguments:base_url - the base URL of your PowerSchool serverclient_id - client ID, found after installing the data access pluginclient_secret - client secret, found after installing the data access pluginfrompypowerschoolimportpowerschoolclient=powerschool.Client('https://example.powerschool.com','client-id','client-secret')Once you have a client, you can start making synchronous calls to the API.# returns list of all schools in the current districtall_schools=client.schools_in_district()# returns list of all students for school with ID of 3students=client.students_for_school(3)# returns dictionary of student with DCID of 1234student=client.student_for_dcid(1234)Refer to theendpoints.pyfile for other built-in methods. Additionally, you can use thefetch_itemandfetch_itemsmethods to access any PowerSchool endpoint. Basic support forPOSThas been included through thepost_datamethod.PowerQueriesPowerQueries are a feature that allows for the creation of custom API endpoints. PyPowerSchool only includes core endpoints and PowerQueries provided directly by PowerSchool. To add additional PowerQueries to PyPowerSchool, you will need to modify the plugin file (PSDataAccessCorePlugin) with the proper <access-request> elements.Using a PowerQuery endpoint works just like any other endpoint. Thepowerquerymethod requires the PowerQuery endpoint URL and, optionally, a dictionary of arguements for the PowerQuery.# returns a list of grade levels for the school and district officegrade_levels=client.powerquery('/ws/schema/query/com.pearson.core.schools.grade_levels')# returns school information for the school with an ID of 1school_details=client.powerquery('/ws/schema/query/com.pearson.core.school.school_detail',{'school_number':[1]})ContributingIf you have a feature or idea you would like to see added to PyPowerSchool, pleasecreate an issueexplaining your idea.Likewise, if you come across a bug, pleasecreate an issueexplaining the bug with as much detail as possible.The PowerSchool API provides access to a lot of information and, unfortunately, we don't have time to research and implement every endpoint. Please feel free to open a pull request with any additional endpoints you create. We would love to have as many of the core endpoints covered as possible.LicensePyPowerSchool is released under an MIT license. SeeLICENSEfor more information.