Skip to main content

powerschool is a Python client for the PowerSchool API

Project description

PowerSchool

powerschool is a Python client for the PowerSchool SIS API

Table of Contents

Installation

Use the package manager pip to install powerschool.

pip install powerschool

Generate Client ID and Client Secret

You can collect the Client ID and Client Secret directly by signing into the PowerSchool Admin portal and navigating to System > System Settings > Plugin Management Dashboard > {Your Plugin}.

Getting Started

  1. Ensure you have a valid plugin installed with the proper data access provisioned for your purposes.

  2. 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 and page 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

powerschool-2.1.0.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

powerschool-2.1.0-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file powerschool-2.1.0.tar.gz.

File metadata

  • Download URL: powerschool-2.1.0.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.7 Linux/5.10.60.1-microsoft-standard-WSL2

File hashes

Hashes for powerschool-2.1.0.tar.gz
Algorithm Hash digest
SHA256 78cb98775f1efcd5a155cd804e7c6a34a13650af9610fcb67c5043b03e5a05a0
MD5 9c88b346e51fb3e75103c7c3657cb5f8
BLAKE2b-256 58ce0d47f93d1d4491ab62b5fd3689bb44c4212546f7ffdde2f3db6f5f6a47f0

See more details on using hashes here.

File details

Details for the file powerschool-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: powerschool-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.7 Linux/5.10.60.1-microsoft-standard-WSL2

File hashes

Hashes for powerschool-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3915da8d5f5b5d8512affe6dde04b9ca0882fe180aa70ffd1ab3c058ed8c1750
MD5 ea267a3b078ceaeb7c3c63dc8a0432da
BLAKE2b-256 5663a9403f2e7510f2cc79453d35c7bf224b861a6832de72a2bc704c0384276b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page