drypy - easy dryrun mode for Python
===================================
The module helps you to implement `dryrun` mode in your
Python projects with an easy switch 'on/off' feature.
:Authors:
Daniele Zanotelli (dazano@gmail.com)
:Copyright:
2017-2020
:License:
MIT
:Python version:
3.x
Documentation
-------------
.. _Sphinx: http://www.sphinx-doc.org/
.. _`project docs`: https://drypy.readthedocs.io/
The package is supplied with Sphinx_ compilable documentation
under the docs directory.
You can read the latest docs visiting the `project docs`_ online.
Installation
------------
Via pip:
::
$ pip install drypy
or download the project from the github and compile the package
::
$ git clone https://github.com/dzanotelli/drypy.git
$ cd drypy
$ make whl
and you'll find your brand-new whl under the dist/ subdirectory.
Basic usage
-----------
Apply the `sham` decorator to your function and set dryrun as on.
::
from drypy import dryrun
from drypy.patterns import sham
>>> @sham
>>> def foo(bar):
pass
>>> dryrun(True)
>>> foo(42)
Will log the following output:
::
[DRYRUN] call to 'foo(42)'
using the python standard logging facility, thus it's up to you
to correctly configure it (check the docs for a working example).
To use custom substitutes with specific beahviours please search in the docs
for the `sheriff-deputy` pattern.
Raw data
{
"_id": null,
"home_page": "https://github.com/dzanotelli/drypy",
"name": "drypy",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": "",
"keywords": "dryrun",
"author": "Daniele Zanotelli",
"author_email": "dazano@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/60/d6/12c56d5197afe0d5cae440895545a1f5ff0d99193ca599166f0ca20e5e9d/drypy-1.0.4.tar.gz",
"platform": null,
"description": "drypy - easy dryrun mode for Python\n===================================\n\nThe module helps you to implement `dryrun` mode in your\nPython projects with an easy switch 'on/off' feature.\n\n:Authors:\n Daniele Zanotelli (dazano@gmail.com)\n:Copyright:\n 2017-2020\n:License:\n MIT\n:Python version:\n 3.x\n\nDocumentation\n-------------\n.. _Sphinx: http://www.sphinx-doc.org/\n.. _`project docs`: https://drypy.readthedocs.io/\n\nThe package is supplied with Sphinx_ compilable documentation\nunder the docs directory.\n\nYou can read the latest docs visiting the `project docs`_ online.\n\nInstallation\n------------\n\nVia pip:\n\n::\n\n $ pip install drypy\n\nor download the project from the github and compile the package\n\n::\n\n $ git clone https://github.com/dzanotelli/drypy.git\n $ cd drypy\n $ make whl\n\nand you'll find your brand-new whl under the dist/ subdirectory.\n\nBasic usage\n-----------\n\nApply the `sham` decorator to your function and set dryrun as on.\n\n::\n\n from drypy import dryrun\n from drypy.patterns import sham\n\n >>> @sham\n >>> def foo(bar):\n pass\n >>> dryrun(True)\n >>> foo(42)\n\nWill log the following output:\n\n::\n\n [DRYRUN] call to 'foo(42)'\n\nusing the python standard logging facility, thus it's up to you\nto correctly configure it (check the docs for a working example).\n\nTo use custom substitutes with specific beahviours please search in the docs\nfor the `sheriff-deputy` pattern.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python utilities to perform dryrun.",
"version": "1.0.4",
"project_urls": {
"Homepage": "https://github.com/dzanotelli/drypy"
},
"split_keywords": [
"dryrun"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fb1b5b42d3db1147aa9dac56f79ea74a968c6f7a1a0ca9f1e819596a84214649",
"md5": "e72d29273d1ab4f81dace31922c7b489",
"sha256": "b94ceee2473c2d901a09ec39fb8cd5d69ca163b83e871e3638456ca13864ba1d"
},
"downloads": -1,
"filename": "drypy-1.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e72d29273d1ab4f81dace31922c7b489",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3",
"size": 6762,
"upload_time": "2024-01-02T14:13:54",
"upload_time_iso_8601": "2024-01-02T14:13:54.925655Z",
"url": "https://files.pythonhosted.org/packages/fb/1b/5b42d3db1147aa9dac56f79ea74a968c6f7a1a0ca9f1e819596a84214649/drypy-1.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "60d612c56d5197afe0d5cae440895545a1f5ff0d99193ca599166f0ca20e5e9d",
"md5": "85ed4890623351327b99fc4dcc113e37",
"sha256": "bd22e191fb27d05bd4e7c4ebfa8e934a5aae8ca276c80e935e44cabbbbe29660"
},
"downloads": -1,
"filename": "drypy-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "85ed4890623351327b99fc4dcc113e37",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3",
"size": 5792,
"upload_time": "2024-01-02T14:13:56",
"upload_time_iso_8601": "2024-01-02T14:13:56.699466Z",
"url": "https://files.pythonhosted.org/packages/60/d6/12c56d5197afe0d5cae440895545a1f5ff0d99193ca599166f0ca20e5e9d/drypy-1.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-02 14:13:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dzanotelli",
"github_project": "drypy",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "drypy"
}