Name | ispyb JSON |
Version |
10.2.4
JSON |
| download |
home_page | None |
Summary | Python package to access ISPyB database |
upload_time | 2024-10-08 15:23:56 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | Apache License 2.0 |
keywords |
ispyb
database
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
|
[![PyPI version](https://img.shields.io/pypi/v/ispyb.svg)](https://pypi.python.org/pypi/ispyb)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/ispyb.svg)](https://anaconda.org/conda-forge/ispyb)
[![Development status](https://img.shields.io/pypi/status/ispyb.svg)](https://pypi.python.org/pypi/ispyb)
[![Python versions](https://img.shields.io/pypi/pyversions/ispyb.svg)](https://pypi.python.org/pypi/ispyb)
[![Build Status](https://dev.azure.com/DLS-tooling/ispyb/_apis/build/status/DiamondLightSource.ispyb-api?branchName=main)](https://dev.azure.com/DLS-tooling/ispyb/\_build/latest?definitionId=2)
[![Coverage Status](https://coveralls.io/repos/github/DiamondLightSource/ispyb-api/badge.svg?branch=main)](https://coveralls.io/github/DiamondLightSource/ispyb-api?branch=main)
[![Documentation Status](https://readthedocs.org/projects/ispyb/badge/?version=latest)](https://ispyb.readthedocs.io/en/latest/?badge=latest)
![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/DiamondLightSource/ispyb-api.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/DiamondLightSource/ispyb-api/context:python)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/DiamondLightSource/ispyb-api.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/DiamondLightSource/ispyb-api/alerts/)
# ISPyB API
This package provides a way to write acquisition and processing results into
an ISPyB database. Currently, the only supported method is through stored
procedures, but the package is designed to allow for other methods as well, such
as webservices.
### Documentation
Please see https://ispyb.readthedocs.io.
### Requirements
* Python 3.7, 3.8, 3.9, 3.10, 3.11
* The MySQL Connector/Python package.
* MariaDB 10.0+ or MySQL 5.6+, but we recommend MariaDB 10.2 or later.
* An ISPyB database installed on the above. See the [ispyb-database](https://github.com/DiamondLightSource/ispyb-database) repository for details.
### Installation
From PyPI:
```bash
pip install --user ispyb
```
The `--user` option installs the package for your own user only.
You can leave it out if you want to install the package system-wide.
To install the source code in editable mode for development:
```bash
git clone git@github.com:DiamondLightSource/ispyb-api.git
pip install --user -e ispyb-api
```
### Examples
```python
import ispyb
from datetime import datetime
# Get a connection and data area objects
with ispyb.open("config.cfg") as conn:
core = conn.core
mx_acquisition = conn.mx_acquisition
# Find the id for a given visit
sessionid = core.retrieve_visit_id("cm14451-2")
# Create a new data collection group entry:
params = mx_acquisition.get_data_collection_group_params()
params["parentid"] = sessionid
params["experimenttype"] = "OSC"
params["starttime"] = datetime.strptime("2017-09-21 13:00:00", "%Y-%m-%d %H:%M:%S")
params["endtime"] = datetime.strptime("2017-09-21 13:00:10", "%Y-%m-%d %H:%M:%S")
params["comments"] = "This is a test of data collection group."
dcg_id = mx_acquisition.insert_data_collection_group(list(params.values()))
print("dcg_id: %i" % dcg_id)
```
See [`docs/pipeline2ispyb.py`](https://github.com/DiamondLightSource/ispyb-api/blob/main/docs/pipeline2ispyb.py) for a more detailed example of how to use the package.
### Tests
Unit tests (pytests) are run automatically by Azure against a real MariaDB ISPyB database schema. You can also run the tests in your Development environment if you have an ISPyB database.
Raw data
{
"_id": null,
"home_page": null,
"name": "ispyb",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "ISPyB, database",
"author": null,
"author_email": "Diamond Light Source <scientificsoftware@diamond.ac.uk>",
"download_url": "https://files.pythonhosted.org/packages/24/4d/86b997af1c6cb980697a908bc57c9c9254ce2fb119ff2088d0c4a6234f23/ispyb-10.2.4.tar.gz",
"platform": null,
"description": "[![PyPI version](https://img.shields.io/pypi/v/ispyb.svg)](https://pypi.python.org/pypi/ispyb)\n[![Conda Version](https://img.shields.io/conda/vn/conda-forge/ispyb.svg)](https://anaconda.org/conda-forge/ispyb)\n[![Development status](https://img.shields.io/pypi/status/ispyb.svg)](https://pypi.python.org/pypi/ispyb)\n[![Python versions](https://img.shields.io/pypi/pyversions/ispyb.svg)](https://pypi.python.org/pypi/ispyb)\n\n[![Build Status](https://dev.azure.com/DLS-tooling/ispyb/_apis/build/status/DiamondLightSource.ispyb-api?branchName=main)](https://dev.azure.com/DLS-tooling/ispyb/\\_build/latest?definitionId=2)\n[![Coverage Status](https://coveralls.io/repos/github/DiamondLightSource/ispyb-api/badge.svg?branch=main)](https://coveralls.io/github/DiamondLightSource/ispyb-api?branch=main)\n[![Documentation Status](https://readthedocs.org/projects/ispyb/badge/?version=latest)](https://ispyb.readthedocs.io/en/latest/?badge=latest)\n![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)\n[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/DiamondLightSource/ispyb-api.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/DiamondLightSource/ispyb-api/context:python)\n[![Total alerts](https://img.shields.io/lgtm/alerts/g/DiamondLightSource/ispyb-api.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/DiamondLightSource/ispyb-api/alerts/)\n\n# ISPyB API\n\nThis package provides a way to write acquisition and processing results into\nan ISPyB database. Currently, the only supported method is through stored\nprocedures, but the package is designed to allow for other methods as well, such\nas webservices.\n\n### Documentation\nPlease see https://ispyb.readthedocs.io.\n\n### Requirements\n* Python 3.7, 3.8, 3.9, 3.10, 3.11\n* The MySQL Connector/Python package.\n* MariaDB 10.0+ or MySQL 5.6+, but we recommend MariaDB 10.2 or later.\n* An ISPyB database installed on the above. See the [ispyb-database](https://github.com/DiamondLightSource/ispyb-database) repository for details.\n\n### Installation\nFrom PyPI:\n```bash\npip install --user ispyb\n```\nThe `--user` option installs the package for your own user only.\nYou can leave it out if you want to install the package system-wide.\n\nTo install the source code in editable mode for development:\n```bash\ngit clone git@github.com:DiamondLightSource/ispyb-api.git\npip install --user -e ispyb-api\n```\n\n### Examples\n```python\nimport ispyb\nfrom datetime import datetime\n\n# Get a connection and data area objects\nwith ispyb.open(\"config.cfg\") as conn:\n core = conn.core\n mx_acquisition = conn.mx_acquisition\n\n # Find the id for a given visit\n sessionid = core.retrieve_visit_id(\"cm14451-2\")\n\n # Create a new data collection group entry:\n params = mx_acquisition.get_data_collection_group_params()\n params[\"parentid\"] = sessionid\n params[\"experimenttype\"] = \"OSC\"\n params[\"starttime\"] = datetime.strptime(\"2017-09-21 13:00:00\", \"%Y-%m-%d %H:%M:%S\")\n params[\"endtime\"] = datetime.strptime(\"2017-09-21 13:00:10\", \"%Y-%m-%d %H:%M:%S\")\n params[\"comments\"] = \"This is a test of data collection group.\"\n dcg_id = mx_acquisition.insert_data_collection_group(list(params.values()))\n print(\"dcg_id: %i\" % dcg_id)\n```\n\nSee [`docs/pipeline2ispyb.py`](https://github.com/DiamondLightSource/ispyb-api/blob/main/docs/pipeline2ispyb.py) for a more detailed example of how to use the package.\n\n### Tests\nUnit tests (pytests) are run automatically by Azure against a real MariaDB ISPyB database schema. You can also run the tests in your Development environment if you have an ISPyB database.\n",
"bugtrack_url": null,
"license": "Apache License 2.0",
"summary": "Python package to access ISPyB database",
"version": "10.2.4",
"project_urls": {
"Bug-Tracker": "https://github.com/DiamondLightSource/ispyb-api/issues",
"Documentation": "https://ispyb.readthedocs.io",
"GitHub": "https://github.com/DiamondLightSource/ispyb-api"
},
"split_keywords": [
"ispyb",
" database"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cb6ac3fd7dfe2d30cc27454af6e93aefdb8f50a5005268e86f8ad0fe319a7884",
"md5": "4dee22dbb75d6886e932a162abf85e3c",
"sha256": "516f6f9601bc0ad04d66d0f740c6b238a94550cb1a2cfa17452dc1d6dde8ddf6"
},
"downloads": -1,
"filename": "ispyb-10.2.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4dee22dbb75d6886e932a162abf85e3c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 72203,
"upload_time": "2024-10-08T15:23:54",
"upload_time_iso_8601": "2024-10-08T15:23:54.824084Z",
"url": "https://files.pythonhosted.org/packages/cb/6a/c3fd7dfe2d30cc27454af6e93aefdb8f50a5005268e86f8ad0fe319a7884/ispyb-10.2.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "244d86b997af1c6cb980697a908bc57c9c9254ce2fb119ff2088d0c4a6234f23",
"md5": "c082bb6c440e921d6580deacb54df7f0",
"sha256": "c712b387e0d52b1f10f4efb6f83fc27446d8f9dad2f8d9e83f0504a178d08897"
},
"downloads": -1,
"filename": "ispyb-10.2.4.tar.gz",
"has_sig": false,
"md5_digest": "c082bb6c440e921d6580deacb54df7f0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 76338,
"upload_time": "2024-10-08T15:23:56",
"upload_time_iso_8601": "2024-10-08T15:23:56.055422Z",
"url": "https://files.pythonhosted.org/packages/24/4d/86b997af1c6cb980697a908bc57c9c9254ce2fb119ff2088d0c4a6234f23/ispyb-10.2.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-08 15:23:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "DiamondLightSource",
"github_project": "ispyb-api",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "ispyb"
}