Skip to main content

Various functionalities: folder synchronization, a logging function, helpersto generate documentation with sphinx, generation of code for Python 2.7 from Python 3

Project description

Build status Build Status Windows https://badge.fury.io/py/pyquickhelper.svg PYPI Package MIT License Code Health Requirements Status https://codecov.io/github/sdpython/pyquickhelper/coverage.svg?branch=master GitHub Issues Waffle

Links:

Functionalities

  • simple forms in notebooks

  • help generation including notebook conversion

  • folder synchronization

  • logging

  • help running unit tests

  • simple server to server sphinx documentation

  • file compression, zip, gzip, 7z

  • helpers for ipython notebooks (upgrade, offline run)

  • parser to quickly add a magic command in a notebook

  • Sphinx directives to integrate a blogpost in the documentation

  • mechanism to add forms in notebooks

Design

This project contains the following folders:

  • a source folder: src

  • a unit test folder: _unittests, go to this folder and run run_unittests.py

  • a folder: _doc, it will contain the documentation, a subfolder _doc/sphinxdox/source/blog contains blog post to communicate on the module

  • a file setup.py to build and to install the module, if the source were retrieve from GitHub, the script can also be called with the following extra options (python setup.py <option>): * clean_space: remove extra spaces in the code * build_sphinx: builds the documentation * unittests: run the unit tests, compute the code coverage

  • a script build_script.bat which produces many script on Windows to easily run the setup, generate the documentation, run the unit tests.

Examples

Convert a notebook into slides:

from pyquickhelper.helpgen import nb2slides
nb2slides("nb.ipynb", "convert.slides.html")

Merge two notebooks:

from pyquickhelper.ipythonhelper import read_nb
nb1 = read_nb("<file1>", kernel=False)
nb2 = read_nb("<file2>", kernel=False)
nb1.merge_notebook(nb2)
nb1.to_json(outfile)

Run a notebook:

from pyquickhelper.ipythonhelper import run_notebook
run_notebook("source.ipynb", working_dir="temp",
            outfilename="modified.ipynb",
            additional_path = [ "c:/temp/mymodule/src" ] )

Run a command line program:

from pyquickhelper.loghelper import run_cmd
out,err = run_cmd("python setup.py install", wait=True)

A sphinx extension to generate python documentation from a script:

.. runpython::
    :showcode:

    import sys
    print("sys.version_info=", str(sys.version_info))

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

pyquickhelper-1.4.1533.tar.gz (292.1 kB view details)

Uploaded Source

Built Distributions

pyquickhelper-1.4.1533-py3-none-any.whl (376.0 kB view details)

Uploaded Python 3

pyquickhelper-1.4.1533-py2-none-any.whl (379.0 kB view details)

Uploaded Python 2

File details

Details for the file pyquickhelper-1.4.1533.tar.gz.

File metadata

File hashes

Hashes for pyquickhelper-1.4.1533.tar.gz
Algorithm Hash digest
SHA256 1b8fb29d7fabbad5c482a3129db81f744934d6d84b8e94e0ed84d594cce7fa35
MD5 813c433c42c9f2f51665f7208412fab7
BLAKE2b-256 362e33e40d9b49872d82e4a56865d207da1405fba46e90f9652e40415e04ca18

See more details on using hashes here.

File details

Details for the file pyquickhelper-1.4.1533-py3-none-any.whl.

File metadata

File hashes

Hashes for pyquickhelper-1.4.1533-py3-none-any.whl
Algorithm Hash digest
SHA256 a321e3ef99364795a2a25491fb258cf133095ccc2001d141afe3f8122dc09706
MD5 d0f5a6aa6d623dbab0af4f4e9f697d90
BLAKE2b-256 58488036ff0b13bec235bf49d29352d72c5c877ce06772d9182d1ff0711ca8de

See more details on using hashes here.

File details

Details for the file pyquickhelper-1.4.1533-py2-none-any.whl.

File metadata

File hashes

Hashes for pyquickhelper-1.4.1533-py2-none-any.whl
Algorithm Hash digest
SHA256 6666d1adc0697b1da36f488377debf4670122af827d60e38b404d2475ef37a1b
MD5 7cf789a802c9967f79d1423c634205cb
BLAKE2b-256 e42a376e253e9d842e33ad377a2d6bf7a45464300b0946cd6a1805b2f442041e

See more details on using hashes here.

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