Skip to main content
logo

Sunsky Python API Service

Simple SDK for use the Open API's of sunsky-online.com

Full documentation at: https://doc.sunsky-online.com/

Maintenance Paypal Donate Satispay Donate Ask Me Anything !

Installation

You can add in your requirements.txt:

pysunsky

or install from PyPI:

pip install pysunsky

or directly from GitHub:

pip installgit+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 credentials.

API Call

If the config.ini file is located in the same directory as your script, you can initialize and call the service directly:

from pysunsky import OpenApiService

open_api_service = OpenApiService()
url_products = "https://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 to the configuration directory:

from pysunsky import OpenApiService

open_api_service = OpenApiService(config_path='./path-of-your-config-file/')
url_products = "https://www.sunsky-api.com/openapi/product!search.do"
parameters = {'gmtModifiedStart': '10/31/2012'}
result = open_api_service.call(url_products, parameters)

Download Product Images

You can download product images directly into a zip file:

from pysunsky import OpenApiService

open_api_service = OpenApiService()
url_images = "https://www.sunsky-api.com/openapi/product!getImages.do"
parameters = {
    'itemNo': 'IP8G0963B',
    'size': '500',
    'watermark': 'https://progressify.dev'
}
open_api_service.download(url_images, parameters, './product_images.zip')

Metadata

Release files for pysunsky 1.0.2

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

Source distribution (sdist)

Source distribution for pysunsky 1.0.2
File Size Uploaded
pysunsky-1.0.2.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pysunsky 1.0.2
File Interpreter ABI Platform
pysunsky-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 6.4 kB

Release files / pysunsky-1.0.2.tar.gz

Download URL pysunsky-1.0.2.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ec85bc87f3cfcc97e6e73a4905c6205a5eb43ebbc8cd76c9cea0dddfe109bceb
BLAKE2b-256 checksum
How to use checksums
ba3219366a740e8f2830d976a1165dbf248f0bcc358dac12580b5e5742312706
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.0

Release files / pysunsky-1.0.2-py3-none-any.whl

Download URL pysunsky-1.0.2-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d133646cc9bc94d6b7ccd14a2db9ff037c22c4b55503483f59e32d4914ef1ca
BLAKE2b-256 checksum
How to use checksums
9c2f2c5d28bf3cfbb196a3941ee651cf923d24800990d601b689dcc5364de2d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.0

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

1 release file

1.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