tamarind


Nametamarind JSON
Version 0.2.1 PyPI version JSON
download
home_pagehttps://github.com/FitMango/tamarind
SummaryMore Neo4j than you can shake a cat at
upload_time2023-05-16 13:48:37
maintainer
docs_urlNone
authorJordan Matelsky
requires_python>=3.9.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<h3 align=center>tamarind</h3>
<h3 align=center>🥭</h3>
<h6 align=center>manage multiple ephemeral neo4j containers</h6>
<p align=center>
<a href="https://pypi.org/project/tamarind/"><img alt="PyPI" src="https://img.shields.io/pypi/v/tamarind.svg?logo=python&logoColor=orange&style=for-the-badge"></a>
<img src="https://img.shields.io/github/issues/FitMango/tamarind.svg?style=for-the-badge" />
<img src="https://img.shields.io/github/license/FitMango/tamarind.svg?style=for-the-badge" />
<a href="https://hub.docker.com/layers/neo4j/library/neo4j/4.2"><img src="https://img.shields.io/badge/Neo4j-4.2-9cf?style=for-the-badge" /></a>
</p>

`tamarind` is a system that manages Neo4j databases by provisioning Docker container resources for you. The user-facing API provides access to a dictionary-like lookup for your databases, and allows you to start and stop database servers on the fly.

## Installation

Install from PyPI using pip:

```shell
pip3 install tamarind
```

You will need Docker already installed if you intend to use the Docker provisioning service. You can install Docker with the script from `https://get.docker.com/`.

## Usage

### Creating a new db

```python
from tamarind import Neo4jDockerProvisioner

N = Neo4jDockerProvisioner()

N.start("MyDatabase")
```

Now you can access this graph database through py2neo:

```python
>>> N["MyDatabase"]
<py2neo.Graph>
```

The object returned is a [`py2neo.database.Graph`](https://py2neo.org/v4/database.html#py2neo.database.Graph) object:

```python
>>> N["MyDatabase"].run("MATCH (a:Person) RETURN a.name, a.born LIMIT 4").data()
[{'a.born': 1964, 'a.name': 'Keanu Reeves'},
 {'a.born': 1967, 'a.name': 'Carrie-Anne Moss'},
 {'a.born': 1961, 'a.name': 'Laurence Fishburne'},
 {'a.born': 1960, 'a.name': 'Hugo Weaving'}]


```

### List all

```python
>>> N.ps().keys()
['MyDatabase', 'OldDatabase']
```

### Stop a service

```python
>>> N.stop("OldDatabase")
>>> N.ps().keys()
['MyDatabase']
```

## Custom Provisioners

If you provision Neo4j instances via resources other than Docker (e.g. via AWS EC2 AMIs), you can extend the `Neo4jProvisioner` class with `start` and `ps` function calls (`stop` is an optional implementation in Tamarind).

## Legal

Licensed under Apache 2.0. Reach out to opensource@fitmango.com with questions.

> Copyright 2021 FitMango.
>
> Licensed under the Apache License, Version 2.0 (the "License");
> you may not use this codebase except in compliance with the License.
> You may obtain a copy of the License at
>
> http://www.apache.org/licenses/LICENSE-2.0
>
> Unless required by applicable law or agreed to in writing, software
> distributed under the License is distributed on an "AS IS" BASIS,
> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> See the License for the specific language governing permissions and
> limitations under the License.

---

<h6 align=center>Made with ❤️ at <a href="https://github.com/fitmango">🥭</a></h6>



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/FitMango/tamarind",
    "name": "tamarind",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Jordan Matelsky",
    "author_email": "opensource@fitmango.com",
    "download_url": "https://files.pythonhosted.org/packages/64/4f/8b2c3c7b6d6288651550742eac285d11c9e81d14311a71ab0bd7f82605e4/tamarind-0.2.1.tar.gz",
    "platform": null,
    "description": "\n<h3 align=center>tamarind</h3>\n<h3 align=center>\ud83e\udd6d</h3>\n<h6 align=center>manage multiple ephemeral neo4j containers</h6>\n<p align=center>\n<a href=\"https://pypi.org/project/tamarind/\"><img alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/tamarind.svg?logo=python&logoColor=orange&style=for-the-badge\"></a>\n<img src=\"https://img.shields.io/github/issues/FitMango/tamarind.svg?style=for-the-badge\" />\n<img src=\"https://img.shields.io/github/license/FitMango/tamarind.svg?style=for-the-badge\" />\n<a href=\"https://hub.docker.com/layers/neo4j/library/neo4j/4.2\"><img src=\"https://img.shields.io/badge/Neo4j-4.2-9cf?style=for-the-badge\" /></a>\n</p>\n\n`tamarind` is a system that manages Neo4j databases by provisioning Docker container resources for you. The user-facing API provides access to a dictionary-like lookup for your databases, and allows you to start and stop database servers on the fly.\n\n## Installation\n\nInstall from PyPI using pip:\n\n```shell\npip3 install tamarind\n```\n\nYou will need Docker already installed if you intend to use the Docker provisioning service. You can install Docker with the script from `https://get.docker.com/`.\n\n## Usage\n\n### Creating a new db\n\n```python\nfrom tamarind import Neo4jDockerProvisioner\n\nN = Neo4jDockerProvisioner()\n\nN.start(\"MyDatabase\")\n```\n\nNow you can access this graph database through py2neo:\n\n```python\n>>> N[\"MyDatabase\"]\n<py2neo.Graph>\n```\n\nThe object returned is a [`py2neo.database.Graph`](https://py2neo.org/v4/database.html#py2neo.database.Graph) object:\n\n```python\n>>> N[\"MyDatabase\"].run(\"MATCH (a:Person) RETURN a.name, a.born LIMIT 4\").data()\n[{'a.born': 1964, 'a.name': 'Keanu Reeves'},\n {'a.born': 1967, 'a.name': 'Carrie-Anne Moss'},\n {'a.born': 1961, 'a.name': 'Laurence Fishburne'},\n {'a.born': 1960, 'a.name': 'Hugo Weaving'}]\n\n\n```\n\n### List all\n\n```python\n>>> N.ps().keys()\n['MyDatabase', 'OldDatabase']\n```\n\n### Stop a service\n\n```python\n>>> N.stop(\"OldDatabase\")\n>>> N.ps().keys()\n['MyDatabase']\n```\n\n## Custom Provisioners\n\nIf you provision Neo4j instances via resources other than Docker (e.g. via AWS EC2 AMIs), you can extend the `Neo4jProvisioner` class with `start` and `ps` function calls (`stop` is an optional implementation in Tamarind).\n\n## Legal\n\nLicensed under Apache 2.0. Reach out to opensource@fitmango.com with questions.\n\n> Copyright 2021 FitMango.\n>\n> Licensed under the Apache License, Version 2.0 (the \"License\");\n> you may not use this codebase except in compliance with the License.\n> You may obtain a copy of the License at\n>\n> http://www.apache.org/licenses/LICENSE-2.0\n>\n> Unless required by applicable law or agreed to in writing, software\n> distributed under the License is distributed on an \"AS IS\" BASIS,\n> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n> See the License for the specific language governing permissions and\n> limitations under the License.\n\n---\n\n<h6 align=center>Made with \u2764\ufe0f at <a href=\"https://github.com/fitmango\">\ud83e\udd6d</a></h6>\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "More Neo4j than you can shake a cat at",
    "version": "0.2.1",
    "project_urls": {
        "Homepage": "https://github.com/FitMango/tamarind"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "644f8b2c3c7b6d6288651550742eac285d11c9e81d14311a71ab0bd7f82605e4",
                "md5": "6b1e621d42f0546acdccdc898bdb8d00",
                "sha256": "f4a0085ddf1454f274e7e0a5665ae77b98ce98319df03589fc6153de191ed786"
            },
            "downloads": -1,
            "filename": "tamarind-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "6b1e621d42f0546acdccdc898bdb8d00",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9.0",
            "size": 9670,
            "upload_time": "2023-05-16T13:48:37",
            "upload_time_iso_8601": "2023-05-16T13:48:37.729782Z",
            "url": "https://files.pythonhosted.org/packages/64/4f/8b2c3c7b6d6288651550742eac285d11c9e81d14311a71ab0bd7f82605e4/tamarind-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-16 13:48:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "FitMango",
    "github_project": "tamarind",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "tamarind"
}
        
Elapsed time: 0.08446s