Skip to main content
https://coveralls.io/repos/github/rbw0/flask-snow/badge.svg?branch=master https://travis-ci.org/rbw0/flask-snow.svg?branch=master https://badge.fury.io/py/flask-snow.svg https://img.shields.io/badge/License-MIT-green.svg

flask-snow

Build apps on top of the ServiceNow REST API using the lightweight Flask microframework

  • Uses the pysnow library.

  • Supports OAuth for a seamless authentication / authorization experience.

Installation

$ pip install flask-snow

Documentation

The documentation can be found here

Usage

Minimal server. Does the following:

  1. Sets config

  2. Creates Snow instance

  3. Queries the incident table by number

  4. Returns JSON representation of the result

from flask import Flask, jsonify
from flask_snow import Snow

app = Flask(__name__)
app.config['SNOW_INSTANCE'] = '<instance name>'
app.config['SNOW_USER'] = '<user name>'
app.config['SNOW_PASSWORD'] = '<password>'

snow = Snow(app)

@app.route('/incidents/<number>')
def incident(number):
    incident = snow.resource(api_path='/table/incident')
    response = incident.get(query={'number': number}).one_or_none() or {}
    return jsonify(response)

if __name__ == '__main__':
    app.run()

Name it server.py and run with python server.py

Check out the examples for more!

Compatibility

  • Python 2 and 3

  • Flask > 0.9

Author

Created by Robert Wikman <rbw@vault13.org> in 2018

JetBrains

Thank you Jetbrains for creating pycharm and for providing me with free licenses

Metadata

Release files for flask-snow 0.2.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flask-snow 0.2.8
File Size Uploaded Provenance
flask-snow-0.2.8.tar.gz 4.2 kB Without provenance Details

Release files / flask-snow-0.2.8.tar.gz

Download URL flask-snow-0.2.8.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d677ad26742e0fd286af4ac51df1df5a00439c524d7382fee3591176b4da426f
BLAKE2b-256 checksum
How to use checksums
068337de2790a05faa6c06fa7733d6a0d3ba0d83365cec28e6bcaf607857fd31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for flask-snow 0.2.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page