Skip to content

mirumee/saleor-sdk-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Saleor SDK Python

A set of tools that help Python developers work with Saleor. This is a very early stage in the life of this library and many things are not yet figured out.

Documentation, contribution rules, process and the code itself (this includes the APIs) are expected to change rapidly.

Installation

pip install saleor-sdk-python

Tooling

This library provides a CLI that contains a growing set of commands that are useful in day-to-day development around Saleor.

There are two entrypoints (here is a good article on why this is important):

python -m saleor_sdk tools
saleor_sdk tools

Saleor ID encoding

saleor-sdk tools decode-id VXNlcjoyMg==
saleor-sdk tools encode-id User 22

Development

To contribute to this repository you will need Hatch to setup a local development environment.

Install Hatch.

Documentation

  1. Run the below command to start a dev server with the documentation site:
hatch run docs:serve

Dev server provides a live reload on changes and lets you preview the site after it's published

and navigate to http://127.0.0.1:8000

Tests

To run tests suite use the following command:

hatch run test 

Code style and linters

Use the following commands to format the code and lint it for issues:

hatch run lint:fmt
hatch run lint:all

Build and deploy

To publish a new version to PyPI, update it's version number in the pyproject/toml file and create new github release.

In case whe you need to make a new release without GitHub workflow, use following hatch commands:

hatch build -c
hatch publish