Skip to main content
https://travis-ci.org/jeffreychan637/wix-instance.svg?branch=master

This is a Python package that parses the Wix Instance for Wix applications that use a Python backend.

This package supports Python 2.7, 3.2, 3.3, 3.4.

In your Wix app, send the unparsed instance along with each request from the client side to your server. On the server, use this package to verify that the instance actually came from Wix to guarentee that the request is valid.

Installation

This package is available on Pypi. Install via pip.

pip install wixinstance

Usage

import wixinstance

#Get the instance ID.
instance_ID = wixinstance.get_instance_ID(YOUR_APP_SECRET, INSTANCE, check_owner)
if instance_ID:
    #process the request because it is valid
else:
    #reject the request because it is invalid

#Get the entire parsed instance object
parsed_instance = wixinstance.instance_parser(YOUR_APP_SECRET, INSTANCE)
if parsed_instance:
    #process the request because it is valid
else:
    #reject the request because it is invalid

Documentation

get_instance_ID

Use this function when you need the instance ID of the parsed instance. The instance ID is returned as a Unicode string.

The function takes in a third argument called check_owner which is a boolean that tells the function whether or not to check if the instance was generated by the owner of the site or a site visitor. Use this to verify requests that only the owner of a site can make (e.g. changing app settings).

The function returns false if the instance is invalid or if the instance was not generated by the site owner (assuming site_owner is set to True).

instance_parser

Use this function when you want the entire parsed instance. The parsed instance is returned as a dictionary. The keys to the dictionary are equivalent to the Instance properties in the Wix Documentation.

Support

File issues with this package here.

Feel free to contribute to this package by making a pull request on Github.

Release files for WixInstance 2.0.3

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

Source distribution (sdist)

Source distribution for WixInstance 2.0.3
File Size Uploaded
WixInstance-2.0.3.tar.gz 5.6 kB Details

Release files / WixInstance-2.0.3.tar.gz

Download URL WixInstance-2.0.3.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
89909a7ee5b913f3bd2c58d7f177f9bb6326141d8353f11e38e57ee3350a7184
BLAKE2b-256 checksum
How to use checksums
e8ed531f8543ffd77a44ec44a3dfbcddceb82c81baab0c525e292ae81856ea1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

2.0.3 This release

1 release file

2.0.2

1 release file

2.0.1

1 release file

2.0.0

2 release files

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

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