https://github.com/progressify/pysunsky
A python SDK for API of: sunsky-online.com
https://github.com/progressify/pysunsky
Last synced: 10 months ago
JSON representation
A python SDK for API of: sunsky-online.com
- Host: GitHub
- URL: https://github.com/progressify/pysunsky
- Owner: progressify
- Created: 2020-08-06T11:13:27.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-09T08:29:38.000Z (over 2 years ago)
- Last Synced: 2025-02-06T16:57:24.018Z (10 months ago)
- Language: Python
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README

# Sunsky Python API Service
Simple SDK for use the Open API's of sunsky-online.com
Full documentation at: https://www.sunsky-online.com/base/doc!view.do?code=openapi
[](https://github.com/progressify/sunsky-python-api-service/graphs/commit-activity)
[](https://www.paypal.me/progressify)
[](https://tag.satispay.com/progressify)
[](https://github.com/progressify/sunsky-python-api-service/issues)
## Installation
You can add in your `requirements.txt`:
```
pysunsky==1.0
```
or you can link the github:
```
git+https://github.com/progressify/pysunsky
```
## Usage
Create a file named `config.ini`
```
[SUNSKY]
key = examplekey123@something
secret = examplesecret123
```
Replace the sample data with your sunsky credential.
If the `config.ini` file is located in the same directory of your script you can call the class directly:
```
open_api_service = OpenApiService()
url_products = "http://www.sunsky-api.com/openapi/product!search.do"
parameters = {'gmtModifiedStart': '10/31/2012'}
result = open_api_service.call(url_products, parameters)
```
Otherwise you can specify a custom (relative or absolute) path:
```
open_api_service = OpenApiService(config_path='./path-of-your-config-file/')
url_products = "http://www.sunsky-api.com/openapi/product!search.do"
parameters = {'gmtModifiedStart': '10/31/2012'}
result = open_api_service.call(url_products, parameters)
```