Skip to main content

A Python adapter for PowerSchool API integration

Project description

PowerSchool Python Adapter

The PowerSchool Adapter is a Python package designed to facilitate seamless integration with the PowerSchool Student Information System (SIS). It provides a set of tools and functionalities that enable developers to interact programmatically with PowerSchool’s data and services, streamlining tasks such as data retrieval, updates, and synchronization between PowerSchool and other applications. This adapter is particularly useful for educational institutions and software developers aiming to enhance their systems’ interoperability with PowerSchool, ensuring efficient data management and operational workflows.

Prerequisites

This package is to be used with alongside a PowerSchool plugin that has enabled in the plugin.xml. This guide assumes you have PowerSchool API and plugin knowledge and does not cover the details of a plugin or its API.

Installation

pip install powerschool-adapter

Configuration

You need to set some variables in .env.

POWERSCHOOL_SERVER_ADDRESS=
POWERSCHOOL_CLIENT_ID=
POWERSCHOOL_CLIENT_SECRET=

API

PowerSchool

The PowerSchool token is automatically retrieved upon executing an API call.

from dotenv import load_dotenv
from powerschool_adapter.powerschool import PowerSchool

load_dotenv()

SERVER_ADDRESS = os.getenv("POWERSCHOOL_SERVER_ADDRESS")
CLIENT_ID = os.getenv("POWERSCHOOL_CLIENT_ID")
CLIENT_SECRET = os.getenv("POWERSCHOOL_CLIENT_SECRET")

powerschool = PowerSchool(
	server_address=SERVER_ADDRESS,
	client_id=CLIENT_ID,
	client_secret=CLIENT_SECRET
)

set_table(table)

Aliases: table()

The set_table function is used to specify which database table should be queried.

response = powerschool.table('students').projection(["DCID", "STUDENT_NUMBER", "LASTFIRST"]).set_method("GET").send()
student_data = json.loads(response.to_json())
print(json.dumps(student_data, indent=4))

set_endpoint(query)

Aliases: to_endpoint(), to()

response = powerschool.set_endpoint("/ws/v1/student").set_id(1).get()
student_data = json.loads(response.to_json())
print(json.dumps(student_data, indent=4))

get_endpoint()

Return the current endpoint

setId($id)

Aliases: for_id()

response = powerschool.to("/ws/v1/student").set_id(1).get()
student_data = json.loads(response.to_json())
print(json.dumps(student_data, indent=4))

extensions

response = powerschool.to('/ws/v1/student').set_id(52).expansions(['demographics', 'addresses', 'alerts', 'phones', 'school_enrollment', 'ethnicity_race', 'contact', 'contact_info', 'initial_enrollment']).get()

q(expression)

Aliases: query_expression()

Sets the q variable to the given FIQL expression.

response = powerschool.set_endpoint("/ws/v1/student").q("name.last_name==Ada*").get()
student_data = json.loads(response.to_json())
print(json.dumps(student_data, indent=4))

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_adapter-1.0.2.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

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

powerschool_adapter-1.0.2-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file powerschool_adapter-1.0.2.tar.gz.

File metadata

  • Download URL: powerschool_adapter-1.0.2.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for powerschool_adapter-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f5e6c56301ab29070401b994f30da2330fa49633a82fa8baa13c76893e979627
MD5 b2369fee132a8cb9b8d841ca00245422
BLAKE2b-256 3cfc6fea8580a73e7d819798ef8c29827d3e183fb6913e4cbc2272420d118bd4

See more details on using hashes here.

File details

Details for the file powerschool_adapter-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for powerschool_adapter-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 72a1a19134b12fa008d7d4aa9d6f72930d66e92afff3c13243aa7e7f2ebbccf8
MD5 31df51882f115578ffe6a0ef2c775066
BLAKE2b-256 e7934d55bd2914fc71da75c0cc3a82827faf77eaaced5d7585f576d2ffb418d4

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