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)

Documentation . Report Bug · Request Feature

Installation

Use the package manager pip to install PySilpo.

pip install pysilpo 

Usage

from pysilpo import User, Cheque
from datetime import datetime

user = (
    User(
        phone_number="+380123456789",
    )
    .request_otp()
    .login()
)

cheques = Cheque(user).get_all(
    date_from=datetime(2024, 7, 19), date_to=datetime(2024, 8, 19)
)

for cheque in cheques:
    print(cheque.sum_balance)
    print(cheque.detail.positions)

Change Log

2.0.0

  • Added OpenID OTP authorization support with cached session and token refresh mechanism
  • Cheque API now more clear and using RestFul API
  • Debug mode now supported!

0.1.2

  • Fix: APIClient.get might return None

0.1.1

  • Silpo changed API domain to graphql.silpo.ua

0.1.0

  • 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

License

Distributed under the Apache2 License. See LICENSE for more information.

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.2.1.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

pysilpo-0.2.1-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pysilpo-0.2.1.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pysilpo-0.2.1.tar.gz
Algorithm Hash digest
SHA256 690bc2f82bb1495fa0f9a0b671b5e5625e9325db0b45312500acc8e2d70dc8b1
MD5 1ad6c9332cea7346a69378e7e8666a66
BLAKE2b-256 b5738035f46a702406116505c75218e0d7b3615725898c48c95a5e82db581356

See more details on using hashes here.

Provenance

The following attestation bundles were made for pysilpo-0.2.1.tar.gz:

Publisher: publish-package.yml on iYasha/pysilpo

Attestations:

File details

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

File metadata

  • Download URL: pysilpo-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pysilpo-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d283e5d93c5321364cf44f72c9f2c55283fba25693402af70949d894de798c4c
MD5 40f0aec6f6c5e47b7f424a21d72e259e
BLAKE2b-256 3b42a61e56601b23c80845061cdc672bbd24be79d05476d27b0149e448197adf

See more details on using hashes here.

Provenance

The following attestation bundles were made for pysilpo-0.2.1-py3-none-any.whl:

Publisher: publish-package.yml on iYasha/pysilpo

Attestations:

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