Package: perfect-pypi
Empty example PYPI package by leecampbellc85
############################################Change log
###########version 0.0.1.12Basic unittest for Core moduleDocumentationversion 0.0.1.6Execute this from command-line (pfpy -v)version 0.0.0.1Init files and directory structureRequirements
#############Linux OS or Windows OSPython (2.7)Basic install
#############.. code-block::pip install perfect-pypi --upgrade(install without cache: pip install perfect-pypi --no-cache-dir  )You can find the detailed documentation inhttps://github.com/leecampbellc85/perfect-pypi.UsageFrom command lineUsage:pfpy --versionpfpy core --input TEXTpfpy core -i TEXT -o stringpfpy 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 thepfpycommand to commandline with the required parameters.pfpy --versionorpfpy -v: Get version of our package*pfpy core --input TEXT * orpfpy core -i TEXT -o string: Write out to screen the TEXT in string format. (module: core)pfpy core -i TEXT --output json: Write out to screen the TEXT in json format. (module: core)From PythonImport the required module from perfectpypi package in python.. code-block::import perfectpypiExamples
########From command lineGet version:
""""""""""""""""""""".. code-block::pfpy -vResult:
.. code-block::0.0.1.11Write out text in string format:
"""""""""""""""""""""""""""""""""""""""".. code-block::pfpy core -i "Hello World"Result:.. code-block::Hello WorldWrite out text in json format:
""""""""""""""""""""""""""""""""""""""""".. code-block::pfpy core -i "Hello World" -o jsonResult:.. code-block::[{'text': 'Hello World'}]From PythonEvery example assumes you are in python shellExecute core module related unittest
"""""""""""""""""""""""""""""""""""""""""""""""""".. code-block::from perfectpypi.core.perfectpypi_core_unittest import *
testResult = runUnittests()Result:.. code-block::test_input (perfectpypi.core.perfectpypi_core_unittest.TestCoreModule) ... All tests passed so far!
ok
test_output (perfectpypi.core.perfectpypi_core_unittest.TestCoreModule) ... All tests passed so far!
ok

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

OKWrite out text in string format:
"""""""""""""""""""""""""""""""""""""""""""""""""".. code-block::from perfectpypi.core.perfectpypi_core import *
getText("Hello World")Result:.. code-block::Hello WorldWrite out text in json format:
"""""""""""""""""""""""""""""""""""""""""""""""""".. code-block::from perfectpypi.core.perfectpypi_core import *
getText("Hello World", "json")Result:.. code-block::{'text': 'Hello World'}Known issues
#############Permission denied on /usr/bin/pfpySometimes you are facing the following issue when you execute thepfpycommand:.. code-block::-bash: /usr/bin/pfpy: Permission deniedSolution to execute the following command:.. code-block::sudo chmod +x /usr/bin/pfpyCommand not found on /usr/bin/pfpyAlthough the package is well prepared sometimes you are facing the following issue after a package update when you execute thepfpycommand:.. code-block::/usr/bin/pfpy: line 2: $'\r': command not found
/usr/bin/pfpy: line 19: syntax error: unexpected end of fileSolution to execute the following command:.. code-block::sudo dos2unix /usr/bin/pfpyLICENSE (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.