
[](https://github.com/ladybug-tools/ladybug/actions)
[](https://coveralls.io/github/ladybug-tools/ladybug)
[](https://www.python.org/downloads/release/python-370/) [](https://www.python.org/downloads/release/python-270/) [](https://github.com/IronLanguages/ironpython2/releases/tag/ipy-2.7.8/)
# ladybug
Ladybug is a Python library to analyze, modify, and visualize EnergyPlus Weather files (epw). You can download epw files from [EPWMap](http://www.ladybug.tools/epwmap/).
This repository is the core library that is the base for the Ladybug Grasshopper Plugin. For plugin-specific questions and comments refer to [ladybug-grasshopper](https://github.com/ladybug-tools/ladybug-grasshopper).
## Note
For the Legacy Ladybug Grasshopper Plugin see [this repository](https://github.com/ladybug-tools/ladybug-legacy).
## [API Documentation](https://www.ladybug.tools/ladybug/docs/)
## Installation
To install the library use:
`pip install ladybug-core`
To check if Honeybee command line interface is installed correctly use `ladybug viz` and you
should get a `viiiiiiiiiiiiizzzzzzzzz!` back in response!
## Usage
```python
# load epw weather data
from ladybug.epw import EPW
epw_data = EPW('path_to_epw_file')
dry_bulb_temp = epw_data.dry_bulb_temperature
# Get altitude and longitude
from ladybug.location import Location
from ladybug.sunpath import Sunpath
# Create location. You can also extract location data from an epw file.
sydney = Location('Sydney', 'AUS', latitude=-33.87, longitude=151.22, time_zone=10)
# Initiate sunpath
sp = Sunpath.from_location(sydney)
sun = sp.calculate_sun(month=11, day=15, hour=11.0)
print('altitude: {}, azimuth: {}'.format(sun.altitude, sun.azimuth))
>>> altitude: 72.26, azimuth: 32.37
```
## Local Development
1. Clone this repo locally
```console
git clone git@github.com:ladybug-tools/ladybug.git
# or
git clone https://github.com/ladybug-tools/ladybug.git
```
2. Install dependencies:
```console
cd ladybug
pip install -r dev-requirements.txt
pip install -r requirements.txt
```
3. Run Tests:
```console
python -m pytest ./tests
```
4. Generate Documentation:
```console
sphinx-apidoc -f -e -d 4 -o ./docs ./ladybug
sphinx-build -b html ./docs ./docs/_build/docs
```
### Derivative Work
Ladybug is a derivative work of the following software projects:
* [PVLib-python](https://github.com/pvlib/pvlib-python) for solar irradiance calculations. Available under BSD 3-clause.
* [PsychroLib](https://github.com/psychrometrics/psychrolib) for psychrometric calculations. Available under MIT License.
Applicable copyright notices for these works can be found within the relevant .py files.
Raw data
{
"_id": null,
"home_page": "https://github.com/ladybug-tools/ladybug",
"name": "ladybug-core",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Ladybug Tools",
"author_email": "info@ladybug.tools",
"download_url": "https://files.pythonhosted.org/packages/8a/2e/4f5e626554b2337260671e07cc764e94ffe3088c428ef6f773c95a1eea07/ladybug_core-0.43.22.tar.gz",
"platform": null,
"description": "\n\n\n[](https://github.com/ladybug-tools/ladybug/actions)\n[](https://coveralls.io/github/ladybug-tools/ladybug)\n\n[](https://www.python.org/downloads/release/python-370/) [](https://www.python.org/downloads/release/python-270/) [](https://github.com/IronLanguages/ironpython2/releases/tag/ipy-2.7.8/)\n\n# ladybug\n\nLadybug is a Python library to analyze, modify, and visualize EnergyPlus Weather files (epw). You can download epw files from [EPWMap](http://www.ladybug.tools/epwmap/).\n\nThis repository is the core library that is the base for the Ladybug Grasshopper Plugin. For plugin-specific questions and comments refer to [ladybug-grasshopper](https://github.com/ladybug-tools/ladybug-grasshopper).\n\n## Note\n\nFor the Legacy Ladybug Grasshopper Plugin see [this repository](https://github.com/ladybug-tools/ladybug-legacy).\n\n## [API Documentation](https://www.ladybug.tools/ladybug/docs/)\n\n## Installation\n\nTo install the library use:\n\n`pip install ladybug-core`\n\nTo check if Honeybee command line interface is installed correctly use `ladybug viz` and you\nshould get a `viiiiiiiiiiiiizzzzzzzzz!` back in response!\n\n## Usage\n\n```python\n# load epw weather data\nfrom ladybug.epw import EPW\nepw_data = EPW('path_to_epw_file')\ndry_bulb_temp = epw_data.dry_bulb_temperature\n\n# Get altitude and longitude\nfrom ladybug.location import Location\nfrom ladybug.sunpath import Sunpath\n\n# Create location. You can also extract location data from an epw file.\nsydney = Location('Sydney', 'AUS', latitude=-33.87, longitude=151.22, time_zone=10)\n\n# Initiate sunpath\nsp = Sunpath.from_location(sydney)\nsun = sp.calculate_sun(month=11, day=15, hour=11.0)\n\nprint('altitude: {}, azimuth: {}'.format(sun.altitude, sun.azimuth))\n>>> altitude: 72.26, azimuth: 32.37\n```\n\n## Local Development\n1. Clone this repo locally\n```console\ngit clone git@github.com:ladybug-tools/ladybug.git\n\n# or\n\ngit clone https://github.com/ladybug-tools/ladybug.git\n```\n2. Install dependencies:\n```console\ncd ladybug\npip install -r dev-requirements.txt\npip install -r requirements.txt\n```\n\n3. Run Tests:\n```console\npython -m pytest ./tests\n```\n\n4. Generate Documentation:\n```console\nsphinx-apidoc -f -e -d 4 -o ./docs ./ladybug\nsphinx-build -b html ./docs ./docs/_build/docs\n```\n\n### Derivative Work\n\nLadybug is a derivative work of the following software projects:\n\n* [PVLib-python](https://github.com/pvlib/pvlib-python) for solar irradiance calculations. Available under BSD 3-clause.\n* [PsychroLib](https://github.com/psychrometrics/psychrolib) for psychrometric calculations. Available under MIT License.\n\nApplicable copyright notices for these works can be found within the relevant .py files.\n",
"bugtrack_url": null,
"license": "AGPL-3.0",
"summary": "Python library to load, analyze and modify EnergyPlus Weather files (epw).",
"version": "0.43.22",
"project_urls": {
"Homepage": "https://github.com/ladybug-tools/ladybug"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "987b2a28a443c15658a09b365584c29688e6dc712dc693e5c26afc2b4867ef38",
"md5": "41ce143d8b3ba20cd66a14175488c3a2",
"sha256": "87cc53fefa823e763d6b8022cdb16bc60fdded1cf45aaad6ed727a232d03c608"
},
"downloads": -1,
"filename": "ladybug_core-0.43.22-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "41ce143d8b3ba20cd66a14175488c3a2",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 267678,
"upload_time": "2024-12-20T04:54:35",
"upload_time_iso_8601": "2024-12-20T04:54:35.278849Z",
"url": "https://files.pythonhosted.org/packages/98/7b/2a28a443c15658a09b365584c29688e6dc712dc693e5c26afc2b4867ef38/ladybug_core-0.43.22-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8a2e4f5e626554b2337260671e07cc764e94ffe3088c428ef6f773c95a1eea07",
"md5": "54de6e9828f8056376519ea56869827e",
"sha256": "e1123c255621e24431c239b46b5a9e84cab2302bb1f491380cfb616d9af41d65"
},
"downloads": -1,
"filename": "ladybug_core-0.43.22.tar.gz",
"has_sig": false,
"md5_digest": "54de6e9828f8056376519ea56869827e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 240662,
"upload_time": "2024-12-20T04:54:38",
"upload_time_iso_8601": "2024-12-20T04:54:38.295323Z",
"url": "https://files.pythonhosted.org/packages/8a/2e/4f5e626554b2337260671e07cc764e94ffe3088c428ef6f773c95a1eea07/ladybug_core-0.43.22.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-20 04:54:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ladybug-tools",
"github_project": "ladybug",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [
{
"name": "ladybug-geometry",
"specs": [
[
"==",
"1.33.13"
]
]
},
{
"name": "click",
"specs": [
[
"==",
"7.1.2"
]
]
},
{
"name": "click",
"specs": [
[
"==",
"8.1.7"
]
]
}
],
"lcname": "ladybug-core"
}