powerschool is a Python client for the PowerSchool API
Project description
PowerSchool
powerschool is a Python client for the PowerSchool SIS API
Installation
Use the package manager pip to install powerschool.
pip install powerschool
Getting Started
-
Ensure you have a valid plugin installed with the proper data access provisioned for your purposes.
-
Instantiate a client by passing the host name of your server and one form of authentication:
- client credentials (tuple)
import powerschool client_id = 'CLi3N7-Id' client_secret = 'cL13N7-53cR37' my_credentials = (client_id, client_secret) ps = powerschool.PowerSchool('my.host.name', auth=my_credentials)
- access token (dict)
import powerschool with open('/path/to/token_file.json', 'r') as f: my_token = json.load(f) ps = powerschool.PowerSchool('my.host.name', auth=my_token)
Usage
Refer to the docs for full functionality, including resources, searching, and pagination.
Instantiate a table or PowerQuery object:
schools_table = ps.get_schema_table('schools')
powerquery = ps.get_named_query('com.pearson.core.student.search.get_student_basic_info')
Get the record count for a table:
schools_table.count()
Query all records, all columns on a table:
Pagination is handled automatically by the client. However, you can manually pass
pagesize
andpage
parameters, should you choose.
schools_table.query()
Query all records on a table, with filter and columns list:
params = {
'q': 'id=ge=10000',
'projection': 'school_number,abbreviation',
}
schools_table.query(**params)
Query a specific record on a table:
schools_table.query(dcid=123)
Execute a PowerQuery, passing arguments in the body:
payload = {
'studentdcid': '5432',
}
powerquery.query(body=payload)
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Notice
PowerSchool® is a registered trademark in the U.S. and/or other countries owned by PowerSchool Education, Inc. or its affiliates. PowerSchool® is used under license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file powerschool-2.0.0.tar.gz
.
File metadata
- Download URL: powerschool-2.0.0.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/5.4.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5997de2eebae5bfd9f8c34c2f2c2bbd0a5fcb1622a76529855fba2360bfd726e |
|
MD5 | 9e3e27c57ef1dd2040925a441203da12 |
|
BLAKE2b-256 | 7ea6cadcde4695cb86188819e2faf03c5ce01915e00d83c380258516b9ccce15 |
File details
Details for the file powerschool-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: powerschool-2.0.0-py3-none-any.whl
- Upload date:
- Size: 17.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/5.4.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97978a5eef2555e7c4bdc89a9f9561d3f93b8e9ef959f65637c09c8a92b96c83 |
|
MD5 | bb37da8ee15ad8c049018abaf9d23dc2 |
|
BLAKE2b-256 | af55ba908fa3a1f2eb6c8c4d923a35dd15aed5c2730721a96b147ef86af467e5 |