# Overview
This is a Python implementation of the [SOMA API specification](https://github.com/single-cell-data/SOMA/blob/main/abstract_specification.md) for interacting with the [Unified Single-cell Data Model](https://github.com/single-cell-data/SOMA).
# Installation
TileDB-SOMA is available on [PyPI](https://pypi.org/project/tiledbsoma/) and [Conda](https://anaconda.org/tiledb/tiledbsoma-py), and can be installed via `pip` or `mamba` as indicated below.
```bash
python -m pip install tiledbsoma
```
```bash
mamba install -c conda-forge -c tiledb tiledbsoma-py
```
To install a specific version:
```shell
$ python -m pip install git+https://github.com/single-cell-data/TileDB-SOMA.git@0.0.6#subdirectory=apis/python
```
To update to the latest version:
```shell
$ python -m pip install --upgrade tiledbsoma
```
## From source
* This requires [`tiledb`](https://github.com/TileDB-Inc/TileDB-Py) (see [./setup.cfg](setup.cfg) for version), in addition to other dependencies in [setup.cfg](./setup.cfg).
* Clone [this repo](https://github.com/single-cell-data/TileDB-SOMA)
* `cd` into your checkout and then `cd apis/python`
* `python -m pip install .`
* Or, if you wish to modify the code and run it, `python -m pip install -v -e .`
* If the TileDB and TileDB-SOMA libraries are locally installed to a custom directory, such as `/usr/local`, set the path with environment variables `TILEDB_PATH` and `TILEDBSOMA_PATH`, `TILEDB_PATH=/usr/local python -m pip install -v -e .`
* Optionally, if you prefer, you can run that inside `venv`:
```shell
$ python -m venv venv
$ . ./venv/bin/activate
$ python -m pip install -v -e .
```
* In either case:
```shell
python -m pytest tests
```
# Status
Please see [https://github.com/single-cell-data/TileDB-SOMA/issues](https://github.com/single-cell-data/TileDB-SOMA/issues).
# `platform_config` format
When accessing SOMA APIs, TileDB-specific settings can be configured with the [`platform_config`](https://github.com/single-cell-data/SOMA/blob/main/abstract_specification.md#platform-specific-configuration) parameter.
The options accepted by TileDB SOMA are described here, using [TypeScript interface syntax](https://www.typescriptlang.org/docs/handbook/2/objects.html):
```typescript
interface PlatformConfig {
tiledb?: TDBConfig;
}
interface TDBConfig {
create?: TDBCreateOptions;
}
interface TDBCreateOptions {
dims?: { [dim: string]: TDBDimension };
attrs?: { [attr: string]: TDBAttr };
allows_duplicates?: bool;
offsets_filters?: TDBFilter[];
validity_filters?: TDBFilter[];
capacity?: number;
cell_order?: string;
tile_order?: string;
}
interface TDBDimension {
filters?: TDBFilter[];
tile?: number;
}
interface TDBAttr {
filters?: TDBFilter[];
}
/**
* Either the name of a filter (in which case it will use
* the default arguments) or a specification with filter args.
*/
type TDBFilter = string | TDBFilterSpec;
interface TDBFilterSpec {
/** The name of the filter. */
_name: string;
/** kwargs that are passed when constructing the filter. */
[kwarg: string]: any;
}
```
# Information for developers
Please see the [TileDB-SOMA wiki](https://github.com/single-cell-data/TileDB-SOMA/wiki).
<!-- temp for readthedocs testing -->
Raw data
{
"_id": null,
"home_page": "https://github.com/single-cell-data/TileDB-SOMA/tree/main/apis/python",
"name": "tiledbsoma",
"maintainer": "TileDB, Inc.",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "help@tiledb.io",
"keywords": null,
"author": "TileDB, Inc.",
"author_email": "help@tiledb.io",
"download_url": "https://files.pythonhosted.org/packages/92/f1/b82d5b2b488e3bd8c9a359da4466e22e2f307c785747d69948ea1d1ffb41/tiledbsoma-1.11.1.tar.gz",
"platform": null,
"description": "# Overview\n\nThis is a Python implementation of the [SOMA API specification](https://github.com/single-cell-data/SOMA/blob/main/abstract_specification.md) for interacting with the [Unified Single-cell Data Model](https://github.com/single-cell-data/SOMA).\n\n# Installation\n\nTileDB-SOMA is available on [PyPI](https://pypi.org/project/tiledbsoma/) and [Conda](https://anaconda.org/tiledb/tiledbsoma-py), and can be installed via `pip` or `mamba` as indicated below.\n\n```bash\npython -m pip install tiledbsoma\n```\n\n```bash\nmamba install -c conda-forge -c tiledb tiledbsoma-py\n```\n\nTo install a specific version:\n\n```shell\n$ python -m pip install git+https://github.com/single-cell-data/TileDB-SOMA.git@0.0.6#subdirectory=apis/python\n```\n\nTo update to the latest version:\n\n```shell\n$ python -m pip install --upgrade tiledbsoma\n```\n\n## From source\n\n* This requires [`tiledb`](https://github.com/TileDB-Inc/TileDB-Py) (see [./setup.cfg](setup.cfg) for version), in addition to other dependencies in [setup.cfg](./setup.cfg).\n* Clone [this repo](https://github.com/single-cell-data/TileDB-SOMA)\n* `cd` into your checkout and then `cd apis/python`\n* `python -m pip install .`\n* Or, if you wish to modify the code and run it, `python -m pip install -v -e .`\n* If the TileDB and TileDB-SOMA libraries are locally installed to a custom directory, such as `/usr/local`, set the path with environment variables `TILEDB_PATH` and `TILEDBSOMA_PATH`, `TILEDB_PATH=/usr/local python -m pip install -v -e .`\n* Optionally, if you prefer, you can run that inside `venv`:\n ```shell\n $ python -m venv venv\n $ . ./venv/bin/activate\n $ python -m pip install -v -e .\n ```\n* In either case:\n ```shell\n python -m pytest tests\n ```\n\n# Status\n\nPlease see [https://github.com/single-cell-data/TileDB-SOMA/issues](https://github.com/single-cell-data/TileDB-SOMA/issues).\n\n# `platform_config` format\n\nWhen accessing SOMA APIs, TileDB-specific settings can be configured with the [`platform_config`](https://github.com/single-cell-data/SOMA/blob/main/abstract_specification.md#platform-specific-configuration) parameter.\nThe options accepted by TileDB SOMA are described here, using [TypeScript interface syntax](https://www.typescriptlang.org/docs/handbook/2/objects.html):\n\n```typescript\ninterface PlatformConfig {\n tiledb?: TDBConfig;\n}\n\ninterface TDBConfig {\n create?: TDBCreateOptions;\n}\n\ninterface TDBCreateOptions {\n dims?: { [dim: string]: TDBDimension };\n attrs?: { [attr: string]: TDBAttr };\n allows_duplicates?: bool;\n\n offsets_filters?: TDBFilter[];\n validity_filters?: TDBFilter[];\n\n capacity?: number;\n cell_order?: string;\n tile_order?: string;\n}\n\ninterface TDBDimension {\n filters?: TDBFilter[];\n tile?: number;\n}\n\ninterface TDBAttr {\n filters?: TDBFilter[];\n}\n\n/**\n * Either the name of a filter (in which case it will use\n * the default arguments) or a specification with filter args.\n */\ntype TDBFilter = string | TDBFilterSpec;\n\ninterface TDBFilterSpec {\n /** The name of the filter. */\n _name: string;\n /** kwargs that are passed when constructing the filter. */\n [kwarg: string]: any;\n}\n```\n\n# Information for developers\n\nPlease see the [TileDB-SOMA wiki](https://github.com/single-cell-data/TileDB-SOMA/wiki).\n\n<!-- temp for readthedocs testing -->\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python API for efficient storage and retrieval of single-cell data using TileDB",
"version": "1.11.1",
"project_urls": {
"Homepage": "https://github.com/single-cell-data/TileDB-SOMA/tree/main/apis/python"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8b1b3fee9ddcf61e0e90a0e9fe8ec270e175cfb034096231d3e7db4b094e18a8",
"md5": "0107720118a692cd7ed62b580c8f3677",
"sha256": "262d3af810737a7bae3a3c2fa376ee57f3d623c9c52571de9c2b11ba58f28b7d"
},
"downloads": -1,
"filename": "tiledbsoma-1.11.1-cp310-cp310-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "0107720118a692cd7ed62b580c8f3677",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": ">=3.8",
"size": 21635181,
"upload_time": "2024-05-14T17:45:33",
"upload_time_iso_8601": "2024-05-14T17:45:33.702949Z",
"url": "https://files.pythonhosted.org/packages/8b/1b/3fee9ddcf61e0e90a0e9fe8ec270e175cfb034096231d3e7db4b094e18a8/tiledbsoma-1.11.1-cp310-cp310-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1dff778d109ef97386107fde61c8882018e62093d5a1882a91bb77644b90f0fa",
"md5": "dec6144367f770e2482788295824a5f7",
"sha256": "81515be06c3dc0359547113a8a43caac097dcf7e647251b8fde64b3e73f17174"
},
"downloads": -1,
"filename": "tiledbsoma-1.11.1-cp310-cp310-macosx_11_0_x86_64.whl",
"has_sig": false,
"md5_digest": "dec6144367f770e2482788295824a5f7",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": ">=3.8",
"size": 24426316,
"upload_time": "2024-05-14T17:45:37",
"upload_time_iso_8601": "2024-05-14T17:45:37.853289Z",
"url": "https://files.pythonhosted.org/packages/1d/ff/778d109ef97386107fde61c8882018e62093d5a1882a91bb77644b90f0fa/tiledbsoma-1.11.1-cp310-cp310-macosx_11_0_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "66c9467870a3aad5090db0fccd301827b18a24acd5c201423a0d43f816f28113",
"md5": "eb8cb45b84fc288118a54d8cc07b8d65",
"sha256": "4c77d619d231ab2d64f5a8b5f24824e5c32f2e3d9063a95cea97c6da3914cadf"
},
"downloads": -1,
"filename": "tiledbsoma-1.11.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "eb8cb45b84fc288118a54d8cc07b8d65",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": ">=3.8",
"size": 15803501,
"upload_time": "2024-05-14T17:45:41",
"upload_time_iso_8601": "2024-05-14T17:45:41.355306Z",
"url": "https://files.pythonhosted.org/packages/66/c9/467870a3aad5090db0fccd301827b18a24acd5c201423a0d43f816f28113/tiledbsoma-1.11.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "61ca4722cfe2f45dc203f0ff46a88a4491f7fcbd02515b7879a8d28a25d561bc",
"md5": "b1ba036ebb57c4859935af3329694db4",
"sha256": "c39a8af2224b3b618f1935daad132ad94c7494d8a51d68d4896bce038dc70032"
},
"downloads": -1,
"filename": "tiledbsoma-1.11.1-cp311-cp311-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "b1ba036ebb57c4859935af3329694db4",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.8",
"size": 21636155,
"upload_time": "2024-05-14T17:45:44",
"upload_time_iso_8601": "2024-05-14T17:45:44.265668Z",
"url": "https://files.pythonhosted.org/packages/61/ca/4722cfe2f45dc203f0ff46a88a4491f7fcbd02515b7879a8d28a25d561bc/tiledbsoma-1.11.1-cp311-cp311-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "23b5cab163bf8cc0c5f3a37bc8933b05c1a730ebf3b0f4888fe01ebeaf42c4bf",
"md5": "30a70689c55997ed1051bd98e4b09d25",
"sha256": "ce77becab755bfd26095e694bbba15e11cfe727dd10040561344fe279c78e931"
},
"downloads": -1,
"filename": "tiledbsoma-1.11.1-cp311-cp311-macosx_11_0_x86_64.whl",
"has_sig": false,
"md5_digest": "30a70689c55997ed1051bd98e4b09d25",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.8",
"size": 24426703,
"upload_time": "2024-05-14T17:45:48",
"upload_time_iso_8601": "2024-05-14T17:45:48.078393Z",
"url": "https://files.pythonhosted.org/packages/23/b5/cab163bf8cc0c5f3a37bc8933b05c1a730ebf3b0f4888fe01ebeaf42c4bf/tiledbsoma-1.11.1-cp311-cp311-macosx_11_0_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a6246f11cafc11222ea336fd55c032acb39b10ff8f895624e2f6edd9eab4a76f",
"md5": "20f987298794fc3fa008d972a114e727",
"sha256": "4a7b95b875365df23193a8484b5c0648a64dcee986b51daace395bd91e400fd6"
},
"downloads": -1,
"filename": "tiledbsoma-1.11.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "20f987298794fc3fa008d972a114e727",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.8",
"size": 15807208,
"upload_time": "2024-05-14T17:45:50",
"upload_time_iso_8601": "2024-05-14T17:45:50.739620Z",
"url": "https://files.pythonhosted.org/packages/a6/24/6f11cafc11222ea336fd55c032acb39b10ff8f895624e2f6edd9eab4a76f/tiledbsoma-1.11.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3d79e51f7828ba342f21c6bbe83d46d07e9311487c8b7cae07d3a380ae2e7b22",
"md5": "0bba15f6fe24230cadd00b9217e39a3f",
"sha256": "7482ab4c4938e1519d6ae9f7e5f3324207d1cfdc3e203411e590c82abdde16a5"
},
"downloads": -1,
"filename": "tiledbsoma-1.11.1-cp38-cp38-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "0bba15f6fe24230cadd00b9217e39a3f",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": ">=3.8",
"size": 21635144,
"upload_time": "2024-05-14T17:45:53",
"upload_time_iso_8601": "2024-05-14T17:45:53.894378Z",
"url": "https://files.pythonhosted.org/packages/3d/79/e51f7828ba342f21c6bbe83d46d07e9311487c8b7cae07d3a380ae2e7b22/tiledbsoma-1.11.1-cp38-cp38-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "267797a3bc7fc5f49a3fdd8814274e6acb205514d755832cbef5f77609f4f4d2",
"md5": "013ccb19e2104dcbca7c3a610a54668b",
"sha256": "10ceef95ad27983b8b9f7ff5ba6d4764a045bf40b8370a7938d599fe33d4db0f"
},
"downloads": -1,
"filename": "tiledbsoma-1.11.1-cp38-cp38-macosx_11_0_x86_64.whl",
"has_sig": false,
"md5_digest": "013ccb19e2104dcbca7c3a610a54668b",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": ">=3.8",
"size": 24426178,
"upload_time": "2024-05-14T17:45:56",
"upload_time_iso_8601": "2024-05-14T17:45:56.899460Z",
"url": "https://files.pythonhosted.org/packages/26/77/97a3bc7fc5f49a3fdd8814274e6acb205514d755832cbef5f77609f4f4d2/tiledbsoma-1.11.1-cp38-cp38-macosx_11_0_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fb3f98a19dae2986e379274f7c60f530a08acc9f1cfdd30bd70d480bc7b244c9",
"md5": "d83c2ead3577ce3c09a390580cb08560",
"sha256": "ea2fed92afdfc1276a05fe424fdbf23139f6ab49ddf9bf7a92645a98cb179309"
},
"downloads": -1,
"filename": "tiledbsoma-1.11.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "d83c2ead3577ce3c09a390580cb08560",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": ">=3.8",
"size": 15802250,
"upload_time": "2024-05-14T17:45:59",
"upload_time_iso_8601": "2024-05-14T17:45:59.664066Z",
"url": "https://files.pythonhosted.org/packages/fb/3f/98a19dae2986e379274f7c60f530a08acc9f1cfdd30bd70d480bc7b244c9/tiledbsoma-1.11.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bd5b2d87971570995a53a6ec10ecda919486edf7d3c43dce28ed17913567c639",
"md5": "353ad9736315064d1bbeeb384d6ba7d4",
"sha256": "9a65efed0d4071e8a16eee4539fc87bcc2a69be2bbf98d21bfd53e2ce888af88"
},
"downloads": -1,
"filename": "tiledbsoma-1.11.1-cp39-cp39-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "353ad9736315064d1bbeeb384d6ba7d4",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.8",
"size": 21635341,
"upload_time": "2024-05-14T17:46:02",
"upload_time_iso_8601": "2024-05-14T17:46:02.321501Z",
"url": "https://files.pythonhosted.org/packages/bd/5b/2d87971570995a53a6ec10ecda919486edf7d3c43dce28ed17913567c639/tiledbsoma-1.11.1-cp39-cp39-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "23e1778fb81914b75d3cf18a0796750c4dbf3f94ebefcfd06add56e6de87d718",
"md5": "a6acfc3d33a78f832979324617c7aa92",
"sha256": "7e41a2d4f973bef220a99f2f4211b36d6edbb29da0d47090401b6b7db6dbfa87"
},
"downloads": -1,
"filename": "tiledbsoma-1.11.1-cp39-cp39-macosx_11_0_x86_64.whl",
"has_sig": false,
"md5_digest": "a6acfc3d33a78f832979324617c7aa92",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.8",
"size": 24426408,
"upload_time": "2024-05-14T17:46:05",
"upload_time_iso_8601": "2024-05-14T17:46:05.599183Z",
"url": "https://files.pythonhosted.org/packages/23/e1/778fb81914b75d3cf18a0796750c4dbf3f94ebefcfd06add56e6de87d718/tiledbsoma-1.11.1-cp39-cp39-macosx_11_0_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a1c4ea3a3d2f56a87561696d75a7205bb2837c0cc932c565d67cfb2c660f43e2",
"md5": "445345b6512a9767cd38765946615d8e",
"sha256": "43b1944961a590ed8a0f8bd9f7aec1eb9db3002546778d3566c5d7dd7355dc8f"
},
"downloads": -1,
"filename": "tiledbsoma-1.11.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "445345b6512a9767cd38765946615d8e",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.8",
"size": 15805272,
"upload_time": "2024-05-14T17:46:08",
"upload_time_iso_8601": "2024-05-14T17:46:08.310646Z",
"url": "https://files.pythonhosted.org/packages/a1/c4/ea3a3d2f56a87561696d75a7205bb2837c0cc932c565d67cfb2c660f43e2/tiledbsoma-1.11.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "92f1b82d5b2b488e3bd8c9a359da4466e22e2f307c785747d69948ea1d1ffb41",
"md5": "9771e966526ee40229ac68894937d976",
"sha256": "032fcfb3007d41e2b87127f904607459dac5a54dde4ba0a21f54209dc5be56ab"
},
"downloads": -1,
"filename": "tiledbsoma-1.11.1.tar.gz",
"has_sig": false,
"md5_digest": "9771e966526ee40229ac68894937d976",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 291688,
"upload_time": "2024-05-14T17:46:10",
"upload_time_iso_8601": "2024-05-14T17:46:10.731919Z",
"url": "https://files.pythonhosted.org/packages/92/f1/b82d5b2b488e3bd8c9a359da4466e22e2f307c785747d69948ea1d1ffb41/tiledbsoma-1.11.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-14 17:46:10",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "single-cell-data",
"github_project": "TileDB-SOMA",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "tiledbsoma"
}