Package: pypi-project
Empty example PYPI package by The1bitChange logversion 0.0.1.11Basic unittest for Core moduleDocumentationversion 0.0.1.6Execute this from command-line (pypr -v)version 0.0.0.1Init files and directory structureRequirementsLinux OS or Windows OSPython (2.7)Basic installpip install pypi-project --upgrade(install without cache: pip install pypi-project –no-cache-dir  )You can find the detailed documentation inhttps://github.com/the1bit/pypi-project.UsageFrom command lineUsage:pypr –versionpypr core –input TEXTpypr core -i TEXT -o stringpypr core -i TEXT –output jsonArguments:Options:-h–helpshow this help message and exit-v –versionshow version and exit–verboseprint status messages-i –inputset input and exit-o –outputoutput format default is string. Possible values: string, jsonYou merely type thepyprcommand to commandline with the required parameters.
*pypr –versionorpypr -v: Get version of our package
*pypr core –input TEXT * or *pypr core -i TEXT -o string: Write out to screen the TEXT in string format. (module: core)
*` pypr core-iTEXT--outputjson `: Write out to screen the TEXT in json format. (module: core)From PythonImport the required module from pypiproject package in pythonimport pypiprojectExamplesFrom command line1. Get version:pypr -vResult:
.. code-block:0.0.1.112. Write out text in string format:pypr core -i "Hello World"Result:Hello World3. Write out text in json format:pypr core -i "Hello World" -o jsonResult:[{'text': 'Hello World'}]From PythonEvery example assumes you are in python shell1. Execute core module related unittestfrom pypiproject.core.pypiproject_core_unittest import *
testResult = runUnittests()Result:test_input (pypiproject.core.pypiproject_core_unittest.TestCoreModule) ... All tests passed so far!
ok
test_output (pypiproject.core.pypiproject_core_unittest.TestCoreModule) ... All tests passed so far!
ok

----------------------------------------------------------------------
Ran 2 tests in 0.003s

OK2. Write out text in string format:from pypiproject.core.pypiproject_core import *
getText("Hello World")Result:Hello World3. Write out text in json format:from pypiproject.core.pypiproject_core import *
getText("Hello World", "json")Result:{'text': 'Hello World'}Known issuesPermission denied on /usr/bin/pyprSometimes you are facing the following issue when you execute thepyprcommand:-bash: /usr/bin/pypr: Permission deniedSolution to execute the following command:sudo chmod +x /usr/bin/pyprCommand not found on /usr/bin/pyprAlthough the package is well prepared sometimes you are facing the following issue after a package update when you execute thepyprcommand:/usr/bin/pypr: line 2: $'\r': command not found
/usr/bin/pypr: line 19: syntax error: unexpected end of fileSolution to execute the following command:sudo dos2unix /usr/bin/pyprLICENSE (MIT)Copyright (c) 2019Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.