Skip to main content

UNOFFICIAL API client for Silpo (Ukrainian supermarket chain)

Project description

Contributors Forks Stargazers Issues MIT License


PySilpo

UNOFFICIAL API client for Silpo (Ukrainian supermarket chain)

Report Bug · Request Feature

Installation

Use the package manager pip to install PySilpo.

pip install pysilpo 

Usage

The library needs to be configured with your account access token, which you can get from Silpo.

  1. Login to your account
  2. Open developer tools in your browser
  3. Go to Console tab
  4. Execute this script
const value = `; ${document.cookie}`;
const parts = value.split(`; accessToken=`);
if (parts.length === 2)
    console.log("%c" + parts.pop().split(';').shift(), "font-size: 20px; color: green;");
else
    console.log("%cAccess token not found. Please make sure that you Logged in your account!", "font-size: 20px; color: red;")
  1. Copy the output and use it as access token

Access token live only 90 days.

import pysilpo
from pysilpo.client import APIClient
from datetime import datetime

pysilpo.api_key = "NDSyYmDwMHE5ODE0Z2JhYTU3HzQ3YzU5YjG2OTRjYTg"

cheques = APIClient.fetch_cheques(
    date_from=datetime(2023, 7, 19),
    date_to=datetime(2023, 8, 19),
).get()

print(cheques)

Change Log

0.0.1

  • Initial release
  • Added support for new resource Cheque History, Cheque Detail and User Info
  • Added README.md file

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contact

If you have any questions, feel free to contact me via email: ivan@simantiev.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysilpo-0.1.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

pysilpo-0.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file pysilpo-0.1.0.tar.gz.

File metadata

  • Download URL: pysilpo-0.1.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.0 Linux/5.15.0-1042-azure

File hashes

Hashes for pysilpo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 af1bed33ed176250525dd5147300d9274c6124c287d517330d3448dc93d131c0
MD5 caa8e98b87a8fa7fa0adc7a8f45bd126
BLAKE2b-256 0e0d8bfa5f14a7c8fd75c6b5adf6b000896cf2d64683ef223fe9ee36d61329ee

See more details on using hashes here.

File details

Details for the file pysilpo-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pysilpo-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.0 Linux/5.15.0-1042-azure

File hashes

Hashes for pysilpo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c955db65f1d798a10e18aea1cb4dfe9f5723e5450b1373f3818e4d604b3288e
MD5 ab40965253197f82ce75c4baa72aa239
BLAKE2b-256 187c1f3633a0966e82ac43a442d69ffe2335b5de43db22aaad4a5b4bbeacaec8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page