GithubHelp home page GithubHelp logo

powerschool's People

Contributors

babikoffb avatar cbini avatar dependabot[bot] avatar pjpiwowarski avatar xrpza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

powerschool's Issues

Missing access token parameter

I'm getting this error:

raise MissingTokenError(description="Missing access token parameter.")
oauthlib.oauth2.rfc6749.errors.MissingTokenError: (missing_token) Missing access token parameter.

was hoping the answer was this simple but it was not resolved
[https://stackoverflow.com/questions/54083943/oauth-facebook-missingtokenerror-missing-token-missing-access-token-paramet]

Table names are... partially case-sensitive

There's some fairly weird behavior when trying to access tables with non-lowercase names. For example (where ps() returns a PowerSchool() instance):

>>> ps().get_schema_table('GradeScaleItem').query()
[None, None, None, ... (one for each row in GradeScaleItem)]

This appears to be happening because, while PowerSchool smiles tolerantly and returns the results you'd expect, the keys in its response are still all lowercase, as in:

{
    'name': 'GradeScaleItem',
    'record': [
        {
            'id': 1, 
            'tables': {'gradescaleitem': { (record keys/values) }}
        },
        ...
    ]
}

As a result, the second get() call at client.py:243 fails to find a match and returns None (because self.name differs from the result's value in case):

data.append(r.get("tables").get(self.name))

Whether this should be "fixed" by case-smashing the table name (self.name.lower() or so) and/or the keys in the result, or just documented in the future (when there exists documentation), I don't know.

Error

I would like to use this module to do work with PowerSchool. Giving it a test run I've ran into this error:

AttributeError: partially initialized module 'powerschool' has no attribute 'PowerSchool' (most likely due to a circular import)

refactor

only while loop, allow input for all vars

def generate_historical_queries(year_id, selector, max_value=None):
# transform yearid to constraint value
if not max_value:
max_value = transform_year_id(year_id, selector)
# get step and stoppage critera for constraint type
constraint_rules = get_constraint_rules(selector, year_id, is_historical=True)
stop_value = constraint_rules["stop"]
step_size = constraint_rules["step_size"]
# generate probing queries
working_value = max_value
probing_query_expressions = []
while (working_value + step_size) >= stop_value:
constraint_values = get_constraint_values(selector, working_value, step_size)
query_expression = get_query_expression(selector, **constraint_values)
probing_query_expressions.append(query_expression)
working_value = working_value - step_size
return probing_query_expressions

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.