{ "info": { "author": "Robert Nowotny", "author_email": "rnowotny1966@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "lib_platform\n============\n\n|Pypi Status| |license| |maintenance| |jupyter|\n\n|Build Status| |Codecov Status| |Better Code| |code climate| |snyk security|\n\n.. |license| image:: https://img.shields.io/github/license/webcomics/pywine.svg\n :target: http://en.wikipedia.org/wiki/MIT_License\n.. |maintenance| image:: https://img.shields.io/maintenance/yes/2019.svg\n.. |Build Status| image:: https://travis-ci.org/bitranox/lib_platform.svg?branch=master\n :target: https://travis-ci.org/bitranox/lib_platform\n.. for the pypi status link note the dashes, not the underscore !\n.. |Pypi Status| image:: https://badge.fury.io/py/lib-platform.svg\n :target: https://badge.fury.io/py/lib_platform\n.. |Codecov Status| image:: https://codecov.io/gh/bitranox/lib_platform/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/bitranox/lib_platform\n.. |Better Code| image:: https://bettercodehub.com/edge/badge/bitranox/lib_platform?branch=master\n :target: https://bettercodehub.com/results/bitranox/lib_platform\n.. |snyk security| image:: https://snyk.io/test/github/bitranox/lib_platform/badge.svg\n :target: https://snyk.io/test/github/bitranox/lib_platform\n.. |jupyter| image:: https://mybinder.org/badge.svg\n :target: https://mybinder.org/v2/gh/bitranox/lib_platform/master?filepath=jupyter_test_lib_platform.ipynb\n.. |code climate| image:: https://api.codeclimate.com/v1/badges/15acaf0e7747a042c505/maintainability\n :target: https://codeclimate.com/github/bitranox/lib_platform/maintainability\n :alt: Maintainability\n\nsome convenience functions used in many scripts\n\nsupports python 2.7 - python 3.7, pypy and possibly other dialects.\n\nthis is also a working example for travis.yml for multi-platform testing :\n\n- install WINE\n- install python 2.7 on wine 32 Bit\n- install python 2.7 on wine 64 Bit\n- install python 3.7 on wine 32 Bit\n- install python 3.7 on wine 64 Bit\n- run pytest on wine (all Versions mentioned above)\n- run code coverage on wine (all Versions mentioned above)\n- osx Build for Python 2.7, Python 3.7\n- pypy Build for Python 2.7, Python 3.7\n- Windows Build Python 2.7\n- Windows Build Python 3.7\n- build rst documentation with rst_include for github and PyPi\n\n`100% code coverage `_, mypy static type checking, tested under `Linux, OsX, Windows and Wine `_, automatic daily builds and monitoring\n\n----\n\n- `Try it Online`_\n- `Installation and Upgrade`_\n- `Basic Usage`_\n- `Requirements`_\n- `Acknowledgements`_\n- `Contribute`_\n- `Report Issues `_\n- `Pull Request `_\n- `Code of Conduct `_\n- `License`_\n\n----\n\nTry it Online\n-------------\n\nYou might try it right away in Jupyter Notebook by using the \"launch binder\" badge, or click `here `_\n\nInstallation and Upgrade\n------------------------\n\nFrom source code:\n\n.. code-block:: bash\n\n # normal install\n python setup.py install\n # test without installing\n python setup.py test\n\nvia pip latest Release:\n\n.. code-block:: bash\n\n # latest Release from pypi\n pip install lib_platform\n\n # test without installing\n pip install lib_platform --install-option test\n\nvia pip latest Development Version:\n\n.. code-block:: bash\n\n # upgrade all dependencies regardless of version number (PREFERRED)\n pip install --upgrade https://github.com/bitranox/lib_platform/archive/master.zip --upgrade-strategy eager\n # normal install\n pip install --upgrade https://github.com/bitranox/lib_platform/archive/master.zip\n # test without installing\n pip install https://github.com/bitranox/lib_platform/archive/master.zip --install-option test\n\nvia requirements.txt:\n\n.. code-block:: bash\n\n # Insert following line in Your requirements.txt:\n # for the latest Release:\n lib_platform\n # for the latest Development Version :\n https://github.com/bitranox/lib_platform/archive/master.zip\n\n # to install and upgrade all modules mentioned in requirements.txt:\n pip install --upgrade -r //requirements.txt\n\nvia python:\n\n.. code-block:: python\n\n # for the latest Release\n python -m pip install upgrade lib_platform\n\n # for the latest Development Version\n python -m pip install upgrade https://github.com/bitranox/lib_platform/archive/master.zip\n\nBasic Usage\n-----------\n\n.. code-block:: python\n\n >>> import lib_platform\n\n >>> # get system as string\n >>> system = lib_platform.system\n\n >>> # bool is_platform_linux\n >>> is_platform_linux = lib_platform.is_platform_linux\n\n >>> # bool is_platform_darwin\n >>> is_platform_darwin = lib_platform.is_platform_darwin\n\n >>> # bool is_platform_posix\n >>> is_platform_posix = lib_platform.is_platform_posix # either darwin or linux\n\n >>> # bool is_platform_windows\n >>> is_platform_windows = lib_platform.is_platform_posix # also True for windows_xp or windows_wine\n\n >>> # bool is_platform_windows_xp\n >>> is_platform_windows_xp = lib_platform.is_platform_windows_xp\n\n >>> # bool is_platform_windows_wine\n >>> is_platform_windows_wine = lib_platform.is_platform_windows_wine\n\n >>> # bool is_platform_windows_wine_xp\n >>> is_platform_windows_wine_xp = lib_platform.is_platform_windows_wine_xp\n\n >>> # string username lib_platform.username\n >>> username = lib_platform.username\n\n >>> # string fqdn hostname\n >>> hostname = lib_platform.hostname\n\n >>> # string hostname short\n >>> hostname_short = lib_platform.hostname_short\n\n >>> # bool is_python2\n >>> is_python2 = lib_platform.is_python2\n\n >>> # bool is_python3\n >>> is_python3 = lib_platform.is_python3\n\n >>> # path to userhome\n >>> path_userhome = lib_platform.path_userhome\n\n >>> # is user administrator (has user admin rights)\n >>> is_user_admin = lib_platform.is_user_admin\n\nRequirements\n------------\n\nfollowing modules will be automatically installed :\n\n.. code-block:: shell\n\n pytest # see : https://github.com/pytest-dev/pytest\n typing # see : https://pypi.org/project/typing/\n lib_registry # see: https://pypi.org/project/lib-registry/\n\nAcknowledgements\n----------------\n\n- special thanks to \"uncle bob\" Robert C. Martin, especially for his books on \"clean code\" and \"clean architecture\"\n\nContribute\n----------\n\nI would love for you to fork and send me pull request for this project.\n- `please Contribute `_\n\nLicense\n-------\n\nThis software is licensed under the `MIT license `_\n\n\nChangelog\n=========\n\n1.0.3\n-----\n2019-06-14: add is_user_admin (check for administration rights)\n\n1.0.2\n-----\n2019-04-28: Documentation Update, minor Fixes in setup.py\n\n1.0.0\n-----\n\n2019-03-28: Initial public release, PyPi Release\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bitranox/lib_platform", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "lib-platform", "package_url": "https://pypi.org/project/lib-platform/", "platform": "", "project_url": "https://pypi.org/project/lib-platform/", "project_urls": { "Homepage": "https://github.com/bitranox/lib_platform" }, "release_url": "https://pypi.org/project/lib-platform/1.0.3/", "requires_dist": [ "pytest", "typing", "lib-registry" ], "requires_python": "", "summary": "some small helpers used in many scripts", "version": "1.0.3" }, "last_serial": 5401996, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "b3d5f58aaeb9fff82c237f67043487ee", "sha256": "6d9d84aa8cfecf14518242c34e4042d763bfba1821f8ece7c4f8ddcc0dfa72e8" }, "downloads": -1, "filename": "lib_platform-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b3d5f58aaeb9fff82c237f67043487ee", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5299, "upload_time": "2019-04-10T16:30:02", "url": "https://files.pythonhosted.org/packages/e3/45/58d069165f91d36bf9fa2409ac2ddb747f1d0c40a351c78449596a12b499/lib_platform-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "71d7d508c51decc7fc0489d8ea7abed4", "sha256": "61b94fd7d528095cb117c1b46e10f717e537a2bcf4ca3fd555e1cf37955583b3" }, "downloads": -1, "filename": "lib_platform-1.0.0.tar.gz", "has_sig": false, "md5_digest": "71d7d508c51decc7fc0489d8ea7abed4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4614, "upload_time": "2019-04-10T16:30:04", "url": "https://files.pythonhosted.org/packages/4c/b5/22e8b849251e8b6f93c152accc84068c954cec3e7b1ebb76cd947a5c3fc4/lib_platform-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "f16638151f9fa76f5b783cd4fb133b85", "sha256": "13d77b347ea5059bc86fcec12e326414e3964c3559b443cb2f07bdad21b54e2b" }, "downloads": -1, "filename": "lib_platform-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f16638151f9fa76f5b783cd4fb133b85", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5315, "upload_time": "2019-04-12T09:00:00", "url": "https://files.pythonhosted.org/packages/b5/d4/915586ca26f0e7ed3d4aac344b476982abb35d0b64acf2ec2c056d561e30/lib_platform-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "529ff563cd468202340c033304c55612", "sha256": "ea5a10d024b7c4a01452a04ba4d8a70ea8696a22e4dc598aa3cbc4c09d615955" }, "downloads": -1, "filename": "lib_platform-1.0.1.tar.gz", "has_sig": false, "md5_digest": "529ff563cd468202340c033304c55612", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4641, "upload_time": "2019-04-12T09:00:01", "url": "https://files.pythonhosted.org/packages/12/12/371b29c39c35a06ee80c0557469ab30130529e608143a52f9d6dd4b2cb8b/lib_platform-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "7108a674bd6a30ae2f6f23bd2a067dd7", "sha256": "93301e812362e3d9e3753497cba18ce9071459c1bfcb557dcd941b19af2da0f3" }, "downloads": -1, "filename": "lib_platform-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "7108a674bd6a30ae2f6f23bd2a067dd7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5608, "upload_time": "2019-04-28T22:32:08", "url": "https://files.pythonhosted.org/packages/a0/6f/a556dadb9dfddda067d1cc18caf7203312043b9e2fa5c17e98285ca9e114/lib_platform-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "05f39bd40d9f8052cf78fc50249da8de", "sha256": "ae1e79d9deb686eb973290da565af9a94a6866185f1054f2e379e92fe96eb02f" }, "downloads": -1, "filename": "lib_platform-1.0.2.tar.gz", "has_sig": false, "md5_digest": "05f39bd40d9f8052cf78fc50249da8de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5141, "upload_time": "2019-04-28T22:32:10", "url": "https://files.pythonhosted.org/packages/fb/2d/ec071e5539a0e325bb77c9ca27eb1e3ad048e791cf2b63c518592bb8c938/lib_platform-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "0f1333cbe98b944f2360cd3e6c0e7d03", "sha256": "db385a075b068e45a58c3dcd15997d2e8ce2d5aef4efda3682f1ebaa244886be" }, "downloads": -1, "filename": "lib_platform-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "0f1333cbe98b944f2360cd3e6c0e7d03", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5914, "upload_time": "2019-06-14T20:36:07", "url": "https://files.pythonhosted.org/packages/61/c7/2f0af89587b8b27586a25c2f21f0a20a4de37ba892ac2cf64e6453968a77/lib_platform-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "894479272c14e4aca7bb2cba9a2fbec3", "sha256": "057db6bd54d6244800b2c6fe8e344cc114e34677199ee75a149acf5b651c0c55" }, "downloads": -1, "filename": "lib_platform-1.0.3.tar.gz", "has_sig": false, "md5_digest": "894479272c14e4aca7bb2cba9a2fbec3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5494, "upload_time": "2019-06-14T20:36:08", "url": "https://files.pythonhosted.org/packages/d5/4f/5f6a61eb3854cf1edbc30f04a6f3f0e3071eed414b0ef3ab0a3d6c793054/lib_platform-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0f1333cbe98b944f2360cd3e6c0e7d03", "sha256": "db385a075b068e45a58c3dcd15997d2e8ce2d5aef4efda3682f1ebaa244886be" }, "downloads": -1, "filename": "lib_platform-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "0f1333cbe98b944f2360cd3e6c0e7d03", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5914, "upload_time": "2019-06-14T20:36:07", "url": "https://files.pythonhosted.org/packages/61/c7/2f0af89587b8b27586a25c2f21f0a20a4de37ba892ac2cf64e6453968a77/lib_platform-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "894479272c14e4aca7bb2cba9a2fbec3", "sha256": "057db6bd54d6244800b2c6fe8e344cc114e34677199ee75a149acf5b651c0c55" }, "downloads": -1, "filename": "lib_platform-1.0.3.tar.gz", "has_sig": false, "md5_digest": "894479272c14e4aca7bb2cba9a2fbec3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5494, "upload_time": "2019-06-14T20:36:08", "url": "https://files.pythonhosted.org/packages/d5/4f/5f6a61eb3854cf1edbc30f04a6f3f0e3071eed414b0ef3ab0a3d6c793054/lib_platform-1.0.3.tar.gz" } ] }