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

Installation

Use the package manager pip to install powerschool.

pip install powerschool

Getting Started

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

  2. Instantiate the client by passing the host name of your server.

    import powerschool
    ps = powerschool.PowerSchool('my.host.name')
    
  3. Authorize the client using:

    • client credentials (tuple)
    my_credentials = (client_id, client_secret)
    ps.authorize(client_credentials=my_credentials)
    
    • a previously saved access token (dict)
    with open(token_file, 'r') as f:
        my_token = json.load(f)
    
    ps.authorize(access_token=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-1.0.0.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

powerschool-1.0.0-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: powerschool-1.0.0.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.9 CPython/3.8.3 Linux/5.3.0-1032-azure

File hashes

Hashes for powerschool-1.0.0.tar.gz
Algorithm Hash digest
SHA256 542a392ce0b2d6ace34e85fa77eeab6cdd1bd3940c24872b45b2600b993e0daa
MD5 7876b0534ce5999ef64059c8696d981d
BLAKE2b-256 140e076ab08574426efe31f2c8455602655a43d6e7ef822abeedd98cf9b59d8d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: powerschool-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.9 CPython/3.8.3 Linux/5.3.0-1032-azure

File hashes

Hashes for powerschool-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 515f00a91a9c69d1f72809e1d7745ffb5f9ba30cea07c97f6288e705580e038d
MD5 b4b3118e30fb03ab82a81a84b06bd5c1
BLAKE2b-256 0b47f90f3310c5b5ec60c3230e4210311ec85cd9148cba4c38bdee88afbe7e4e

See more details on using hashes here.

Supported by

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