Skip to main content

No project description provided

Project description

PWBM Local Development Tools

Requirements

Tool implemented for Python version 3.9

Installation instruction:

Virtual environment manager

pipenv documentation:

First the manager itself should be installed:

python3.9 -m pip install pipenv

Creating virtual environment

In terms of pipenv, virtual environment is just a folder. That means, that all you have to do is to create a folder and run following command:

pipenv install --python 3.9

A virtual environment will for Python version 3.9 will be created.

Virtual environment usage

There are two ways to work with virtual environment:

  1. It can be activated by following command:
pipenv shell

After activating the environment command may be run as pwbm <command>

  1. Running command without activating environment:
pipenv run pwmb-sp <command>

Note: Both this option assume that current folder is the folder with virtual environment

Install Python package:

After creating virtual environment, execute following command:

pipenv install --python 3.9 pwbm-sp-dev

This will install the latest package version

Verify installation

pipenv run pwbm-sp

If everything was installed correctly, help message will be printed

Installing legacy versions

Toolset supports installation of legacy versions.

Installation of particular version:

pipenv install --python 3.9 pwbm-sp-dev==0.0.0

Where 0.0.0 is replaced with package version

NOTE: It's NOT possible to have multiple version of the package within same virtual environment. If you want to use multiple versions - install them in separate environments.

Features

PWBM local development tools has following feature:

  • Create boilerplate
pwbm-sp boilerplate /path/to/file.py

This command will create a Python file in specified location

  • Run scraper script
pwbm-sp run /path/to/store/file.py

This command will run file from specified location. If custom scraper needs parameters, they can be provided in a following way:

pwbm-sp run /path/to/input/file.py -p param1=value1 param2=value2
  • Wrap scraper script into pipeline configuration
pwbm-sp wrap --input /path/to/input/file.py --output /path/to/output/file.json

Omitting --output parameter will result printing pipeline configuration into console.

If custom scraper needs parameters, they can be provided in a following way:

pwbm-sp wrap --input /path/to/input/file.py -p param1=value1 param2=value2

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

pwbm-sp-dev-0.17.9.tar.gz (7.9 kB view details)

Uploaded Source

File details

Details for the file pwbm-sp-dev-0.17.9.tar.gz.

File metadata

  • Download URL: pwbm-sp-dev-0.17.9.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pwbm-sp-dev-0.17.9.tar.gz
Algorithm Hash digest
SHA256 46ba27245cebe91ae61e1fa25736e06e9fa0ad2f0a2ee41059912991400cd3ed
MD5 914233227b3d8db38680ff84883b86c6
BLAKE2b-256 43998f8388116c2efcb511cfdac00546ec09baba976eef2f96ee2862b4219f94

See more details on using hashes here.

Supported by

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