Skip to main content

No project description provided

Project description

PWBM Local Development Tools

Requirements

Tool implemented for Python version 3.8

Installation instruction:

Virtual environment manager

pipenv documentation:

First the manager itself should be installed:

python3.8 -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.8

A virtual environment will for Python version 3.8 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.8 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.8 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.16.36.tar.gz (6.9 kB view hashes)

Uploaded Source

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