{ "info": { "author": "Michel Lavoie", "author_email": "lavoie.michel@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "\n# energy_tools\n\nModest collection of electrical energy calculation tools.\n\n**Content:**\n\n- [Installation](#installation)\n - [Requirements](#requirements)\n - [Installing energy_tools](#installing-energy_tools)\n - [With pip](#with-pip)\n - [Without pip](#without-pip)\n - [Development version](#development-version)\n - [Test your installation](#test-your-installation)\n- [Features](#features)\n - [complex](#complex)\n - [energy_factors](#energy_factors)\n - [misc](#misc)\n - [per_unit](#per_unit)\n - [phasor](#phasor)\n- [Usage](#usage)\n- [Contributing](#contributing)\n\n## Installation\n\n### Requirements\n\nBasic requirements:\n\n- [Python 3.6+](http://www.python.org/download/releases/);\n- numpy.\n\nDevelopment requirements:\n\n- pre-commit;\n- pytest;\n- twine.\n\n### Installing energy_tools\n\n#### With pip\n\n1. Open a command prompt (e.g. Start > cmd on windows systems);\n2. Install energy_tools by running:\n\n```\npip install energy_tools\n```\n\n#### Without pip\n\nIf you don\u2019t have internet access on your system or don\u2019t want to use pip for some other reason, energy_tools can also be installed without using pip:\n\n1. Download and unzip the current energy_tools distribution from PyPi under \u201cDownload files\u201d.\n2. Open a command prompt (e.g. Start > cmd on Windows) and navigate to the folder that contains the setup.py file with the command cd :\n\n```\ncd %path_to_energy_tools%\\energy_tools-x.x.x\\\n```\n\nInstall energy_tools by running :\n\n```\npython setup.py install\n```\n\n#### Development version\n\nTo install the latest development version of energy_tools from GitLab, simply follow these steps:\n\n1. Download and install git.\n2. Open a git shell and navigate to the directory where you want to keep your energy_tools files.\n3. Run the following commands:\n\n```\n/c/Python36/python.exe -m venv energy_tools\ncd energy_tools\ngit clone https://gitlab.com/miek770/energy_tools.git\nsource Scripts/activate\npython -m pip install -U pip\npip install numpy pre-commit pytest twine\n```\n\n4. Navigate inside the repository and check out the develop branch:\n\n```\ncd energy_tools\ngit checkout develop\n```\n\n5. Install [Black](https://github.com/ambv/black#version-control-integration) using pre-commit:\n\n```\npre-commit install\n```\n\n5. Set your Python path to the outer energy_tools folder (/energy_tools, NOT energy_tools/energy_tools).\n6. If necessary, install missing dependencies via pip install (see Development requirements above).\n\n### Test your installation\n\nTo test your installed development version, run pytest from the energy_tools' base directory:\n\n```\npytest\n```\n\n## Features\n\n`energy_tools` currently includes the following modules:\n\n### complex\n\nThe `complex` module includes an improved `EleComplex` class which adds the following attributes (properties): `phase`, `module`.\n\n- `EleComplex.phase` returns the complex number's phase in degrees.\n- `EleComplex.module` returns the complex number's amplitude.\n\nThe `complex` module also includes a `complex_impedance` function that returns an improved `EleComplex` number, based on a provided real impedance *z* and an *X/R* ratio.\n\nThe `EleComplex` class must be imported in order for some of the other tools to be usable:\n\n``` python\nfrom energy_tools.complex import EleComplex\n```\n\nSee [Usage](#usage) below for more details.\n\n### energy_factors\n\nThe `energy_factors` module includes functions to calculate yearly energy factors for special calculations. Currently, it includes the `utilisation_factor` and `loss_factor` functions.\n\n### misc\n\nThe `misc` module includes basic functions to manipulate impedances, including `serie`, `parallel`, `zCap` and `zInd`. These calculate series impedance, parallel impedances, capacitance impedance and inductance impedance respectively.\n\n### per_unit\n\nThe `per_unit` module includes functions that return the base current, impedance and power.\n\n### phasor\n\nThe `phasor` module includes a new data type `Phasor` for the electrical phasor used in power systems.\n\nA phasor is defined by an amplitude and a phase. The instance can be created either using those, or by providing a complex amplitude (in this case the phase is ignored). Several operations are supported, including: addition, substraction, multiplication, division, power, inversion and equality with either another phasor, a float or an integer.\n\nIt also provides a nice representation in this form: 120.000 @ 0.000\u00b0\n\nAttributes:\n\n- amp: The unitless phasor amplitude.\n- pha: The phasor's phase in degrees.\n- real: The phasor's real part (interpreted as a complex number).\n- imag: The phasor's imaginary part (interpreted as a complex number).\n\nThe `phasor` module also includes functions `sequences` and `phasors`. The former retuns phase A's sequence voltages from phase A, B and C's voltages. The latter does the opposite, i.e. it returns phase A, B and C's voltages from phases A's sequence voltages.\n\n## Usage\n\nSample usage may be found in the [tests](https://gitlab.com/miek770/energy_tools/tree/master/energy_tools/tests) directory. Most of these tools are straightforward (or aim to be), so the tests and docstrings should be helpful enough.\n\nAs mentioned [above](#complex), the `EleComplex` class must be imported in order for many of the other tools to be usable:\n\n``` python\nfrom energy_tools.complex import EleComplex\n```\n\nWhen the improved `EleComplex` type is imported this way, the following call will result in variable `a` being an `energy_tools.complex.EleComplex` instance, as expected:\n\n```\na = EleComplex(1, 1)\na.phase # Will return 45 degrees\n```\n\nImplicitly declaring a complex number, however, will return the built-in `complex` type:\n\n```\na = 1 + 1j\na.phase # Will raise AttributeError\n```\n\n## Contributing\n\nIf you wish to contribute, please follow the development version instructions above and refer to the project's [contribution guide](https://gitlab.com/miek770/energy_tools/blob/master/CONTRIBUTING.md).\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/miek770/energy_tools", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "energy-tools", "package_url": "https://pypi.org/project/energy-tools/", "platform": "", "project_url": "https://pypi.org/project/energy-tools/", "project_urls": { "Homepage": "https://gitlab.com/miek770/energy_tools" }, "release_url": "https://pypi.org/project/energy-tools/0.3.0/", "requires_dist": [ "numpy" ], "requires_python": ">=3.6", "summary": "Modest collection of electrical energy calculation tools.", "version": "0.3.0" }, "last_serial": 5093677, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "725703bcbb04597060cda17f77d9d692", "sha256": "c73ed2c34cd655328eb540d8b25197965d18c7e5d4e9a92bbff89e81c6216046" }, "downloads": -1, "filename": "energy_tools-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "725703bcbb04597060cda17f77d9d692", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.4", "size": 10818, "upload_time": "2018-12-29T02:46:10", "url": "https://files.pythonhosted.org/packages/a6/cd/a270992863296b1558aca07b28ff2d76d4958717f144369cf0e6d866dba0/energy_tools-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8d145ef459b2cf58642ade31d2a73f87", "sha256": "1c25ca302060b52ccc91a4a5e69722d6424a4e9a975b35a39bb90c007111dd88" }, "downloads": -1, "filename": "energy-tools-0.1.0.tar.gz", "has_sig": false, "md5_digest": "8d145ef459b2cf58642ade31d2a73f87", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 8135, "upload_time": "2018-12-29T02:46:12", "url": "https://files.pythonhosted.org/packages/3b/c3/7363b7cfde305d5c11de405c3d84344c165c730960d9f59c0c0376d078eb/energy-tools-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "07cbd217fc32d2aea8a711148a76e29d", "sha256": "c974248a135915c53cb930d4b7f2f9271d1d5ec59116930d66239f730a590ec9" }, "downloads": -1, "filename": "energy_tools-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "07cbd217fc32d2aea8a711148a76e29d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6", "size": 10831, "upload_time": "2018-12-29T02:49:24", "url": "https://files.pythonhosted.org/packages/85/03/174aba20c97421beab776f4d80de4c3389955a28ca8d8187411c7e4fb720/energy_tools-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "509c73062ec83c355d2d6019d58f478c", "sha256": "9fac953ad20eefa4caa05f2f41c368cd5721b7f1f7120690ae4374562d1fa703" }, "downloads": -1, "filename": "energy-tools-0.1.1.tar.gz", "has_sig": false, "md5_digest": "509c73062ec83c355d2d6019d58f478c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8143, "upload_time": "2018-12-29T02:49:25", "url": "https://files.pythonhosted.org/packages/12/a1/76cac56049dbc699a40c8c2483cc6dcf27fa81eee51e40eb32aba7d12ea0/energy-tools-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "b29955cd9906e06b60b10cec9ad9ff8f", "sha256": "2441582f2b550600544058d3cf582adc94b88bf4d18fe406aab8b262527977f2" }, "downloads": -1, "filename": "energy_tools-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b29955cd9906e06b60b10cec9ad9ff8f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6", "size": 12147, "upload_time": "2018-12-29T18:53:46", "url": "https://files.pythonhosted.org/packages/92/34/652369b5f51789fc933a6a953a7a95c292fb2c887754a74b016fd7972e60/energy_tools-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0fd515a2c74ef87e69b2c0baa6a3b368", "sha256": "f6d3022fc00c4a974e2d9bfb2df308a8000cff86672934c9e3c943e528850fad" }, "downloads": -1, "filename": "energy_tools-0.1.2.tar.gz", "has_sig": false, "md5_digest": "0fd515a2c74ef87e69b2c0baa6a3b368", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 9449, "upload_time": "2018-12-29T18:53:47", "url": "https://files.pythonhosted.org/packages/28/d7/3b1d3664e637b543bd5621bcdf0478f51a2be12fae77ed4126c0903b7ab7/energy_tools-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "ffe57161b10cc5bde0ffbaa4c741b37d", "sha256": "f629f4cbcc7447e04d2d4d65f25ee311c1c24e088819c5853d377d8edd0a4246" }, "downloads": -1, "filename": "energy_tools-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ffe57161b10cc5bde0ffbaa4c741b37d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6", "size": 11574, "upload_time": "2019-01-03T19:52:12", "url": "https://files.pythonhosted.org/packages/be/63/16f6b4bbb2dae49c0bf5d6150a513d1322c53708cbc18686beed3295debd/energy_tools-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c6a264424c70c05fd7fd6159beb2fef7", "sha256": "e71b6ad9c8ccbba113e712173713af9eb491287e84224cddb6c50c968354b1cf" }, "downloads": -1, "filename": "energy_tools-0.2.0.tar.gz", "has_sig": false, "md5_digest": "c6a264424c70c05fd7fd6159beb2fef7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 9414, "upload_time": "2019-01-03T19:52:13", "url": "https://files.pythonhosted.org/packages/e5/a4/193f5cd07b614d932ebfae5a29f19d59f9e50e1b21470f553e62fbcc58ec/energy_tools-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "5c68055363fdc774cba2bc980f5c47ad", "sha256": "d4642c4fc44e793a61da89306c2a08505446238b44163eb2e52e23a0a2d80781" }, "downloads": -1, "filename": "energy_tools-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5c68055363fdc774cba2bc980f5c47ad", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6", "size": 10855, "upload_time": "2019-01-30T14:45:43", "url": "https://files.pythonhosted.org/packages/97/75/7a886f85ee077098d60d33aa01f4c300fa5e97c7d2f90b30d4b10bf12bec/energy_tools-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "859a9e319a53952c6979126deaf06f6d", "sha256": "1903a6bf8a8bb55b9cfec2439f89c0f2ef0909e6c49d62484871062e7a0c2855" }, "downloads": -1, "filename": "energy_tools-0.2.1.tar.gz", "has_sig": false, "md5_digest": "859a9e319a53952c6979126deaf06f6d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 11586, "upload_time": "2019-01-30T14:45:44", "url": "https://files.pythonhosted.org/packages/2e/b5/a8345223a0b38826ec91c8bd1e016e9f340fd8fcf02e8b4e02d63136947d/energy_tools-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "269612b4e60c892c461f65a58501fc0b", "sha256": "4a96bf6c44e708888dab2e1a99b11ecac1fdb9e262a0723bb1bdfaa778e8ece5" }, "downloads": -1, "filename": "energy_tools-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "269612b4e60c892c461f65a58501fc0b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6", "size": 12551, "upload_time": "2019-04-04T00:22:53", "url": "https://files.pythonhosted.org/packages/46/a0/f71ea85c066dc930bdb8cc58e15422d37d792f0cee4eab4d3c7d717ed103/energy_tools-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "662ad603d776766f3ce03126aa50a7cc", "sha256": "2da388d6203f81728a34e1eb9b22d624c8ebce09aa2fa317036dcf1537317de8" }, "downloads": -1, "filename": "energy_tools-0.3.0.tar.gz", "has_sig": false, "md5_digest": "662ad603d776766f3ce03126aa50a7cc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 10296, "upload_time": "2019-04-04T00:22:54", "url": "https://files.pythonhosted.org/packages/7c/de/38763af25c45b85672932ad9c71a5a2c66d1512a625a8efce0cf097ac938/energy_tools-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "269612b4e60c892c461f65a58501fc0b", "sha256": "4a96bf6c44e708888dab2e1a99b11ecac1fdb9e262a0723bb1bdfaa778e8ece5" }, "downloads": -1, "filename": "energy_tools-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "269612b4e60c892c461f65a58501fc0b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6", "size": 12551, "upload_time": "2019-04-04T00:22:53", "url": "https://files.pythonhosted.org/packages/46/a0/f71ea85c066dc930bdb8cc58e15422d37d792f0cee4eab4d3c7d717ed103/energy_tools-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "662ad603d776766f3ce03126aa50a7cc", "sha256": "2da388d6203f81728a34e1eb9b22d624c8ebce09aa2fa317036dcf1537317de8" }, "downloads": -1, "filename": "energy_tools-0.3.0.tar.gz", "has_sig": false, "md5_digest": "662ad603d776766f3ce03126aa50a7cc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 10296, "upload_time": "2019-04-04T00:22:54", "url": "https://files.pythonhosted.org/packages/7c/de/38763af25c45b85672932ad9c71a5a2c66d1512a625a8efce0cf097ac938/energy_tools-0.3.0.tar.gz" } ] }