The Propertia SDK helps users integrate easily with the SmartScore services
Project description
Propertia SDK
The Propertia SDK helps users integrate easily with the SmartScore services
Installation
Install Propertia SDK using pip
pip install propertia
SDK set up
In order to authenticate with Propertia, you will have to supply the API Key.
from propertia.client import PropertiaClient
with PropertiaClient(api_key="your_api_key") as client:
...
Usage
Get Scores
Given coordinates and needs, return the scores
Takes:
- properties
- needs
Returns:
- List of properties sorted by descending scores
Example:
from propertia.client import PropertiaClient
properties = [
{
"id": "Property A",
"latitude": "43.70558",
"longitude": "-79.530985"
},
{
"id": "Property B",
"latitude": "43.640971",
"longitude": "-79.579119"
},
{
"id": "Property C",
"latitude": "43.704711",
"longitude": "-79.287965"
}
]
needs = {
"food-and-drink": {
"importance": 5,
"categories": [
"fast-food"
]
}
}
with PropertiaClient(api_key="your_api_key") as client:
scores = client.get_scores(properties, needs)
# Do something with your scores
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
propertia-0.1.5.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for propertia-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5f394c35a268eda26929e4e46a4df87cdb7471e2385022faa54a8d95d748c4d |
|
MD5 | 1e60a253cb7e2a60c826b5aa27d93906 |
|
BLAKE2b-256 | 9255f9802b3542d07949d1d95c0ceb9d2005c39d4ac0f4d2ca2abc020da1d5b2 |