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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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