# Mastodon Reader for Python
Import the *spots and links tables*, *features*, *tags* and meta data from a *Mastodon project file*.
ported to Python from: [matlab-mastodon-importer](https://github.com/mastodon-sc/matlab-mastodon-importer)
## Example
Read the mastodon file:
```python
from mastodon_reader import MastodonReader
mr = MastodonReader("demo/demo.mastodon")
# show meta data
meta_data = mr.read_metadata()
# read (networkX) graph representation, spot and link tables with features and tags columns
graph, spots, links, tag_definition = mr.read(tags=True, features=True)
```
or read information separately
```python
# read only spot and link tables
spots, links = mr.read_tables()
# read tag_definition and add tags as new columns to the spot and link tables
tag_definition = mr.read_tags(spots, links)
# read features and add as new columns to the spot and link tables
mr.read_features(spots, links)
# create networkX DiGraph representation form spots and links
graph = mr.create_nx_graph(spots, links)
```
## Installation
#### Current version
`pip install git+git://github.com/mastodon-sc/python-mastodon-importer.git`
#### pip
`pip install Mastodon-Reader`
more information [on PyPi](https://pypi.org/project/Mastodon-Reader/)
#### Dependencies
* numpy
* pandas
* networkx
Raw data
{
"_id": null,
"home_page": "https://git.ist.ac.at/csommer/mastodon_reader",
"name": "Mastodon-Reader",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Christoph Sommer",
"author_email": "christoph.sommer23@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/7c/80/4616b5b1115fc1323fa04b701adb253c5b6381fd04e3998370fa385b5a15/Mastodon-Reader-0.3.1.tar.gz",
"platform": null,
"description": "# Mastodon Reader for Python\r\nImport the *spots and links tables*, *features*, *tags* and meta data from a *Mastodon project file*.\r\n\r\nported to Python from: [matlab-mastodon-importer](https://github.com/mastodon-sc/matlab-mastodon-importer)\r\n\r\n## Example\r\nRead the mastodon file:\r\n\r\n```python\r\nfrom mastodon_reader import MastodonReader\r\n\r\nmr = MastodonReader(\"demo/demo.mastodon\")\r\n\r\n# show meta data\r\nmeta_data = mr.read_metadata()\r\n\r\n# read (networkX) graph representation, spot and link tables with features and tags columns\r\ngraph, spots, links, tag_definition = mr.read(tags=True, features=True)\r\n\r\n```\r\nor read information separately\r\n\r\n```python\r\n# read only spot and link tables\r\nspots, links = mr.read_tables()\r\n\r\n# read tag_definition and add tags as new columns to the spot and link tables\r\ntag_definition = mr.read_tags(spots, links)\r\n\r\n# read features and add as new columns to the spot and link tables\r\nmr.read_features(spots, links)\r\n\r\n# create networkX DiGraph representation form spots and links\r\ngraph = mr.create_nx_graph(spots, links)\r\n```\r\n\r\n## Installation\r\n#### Current version\r\n`pip install git+git://github.com/mastodon-sc/python-mastodon-importer.git`\r\n\r\n#### pip\r\n`pip install Mastodon-Reader`\r\n\r\nmore information [on PyPi](https://pypi.org/project/Mastodon-Reader/)\r\n\r\n#### Dependencies\r\n* numpy\r\n* pandas\r\n* networkx\r\n\r\n\r\n",
"bugtrack_url": null,
"license": "BSD",
"summary": "Mastodon project file reader for Python",
"version": "0.3.1",
"project_urls": {
"Homepage": "https://git.ist.ac.at/csommer/mastodon_reader"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "603243146f693217229bdee844958e3418a5b7bb73021d326a2a3a93558fcb03",
"md5": "cbef279a3ad69d0999cea97594bf8c98",
"sha256": "67f18a777f9914f17f15c96393343ad763db02162b227026944df2497b4306e5"
},
"downloads": -1,
"filename": "Mastodon_Reader-0.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cbef279a3ad69d0999cea97594bf8c98",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 11845,
"upload_time": "2024-03-19T10:19:50",
"upload_time_iso_8601": "2024-03-19T10:19:50.986207Z",
"url": "https://files.pythonhosted.org/packages/60/32/43146f693217229bdee844958e3418a5b7bb73021d326a2a3a93558fcb03/Mastodon_Reader-0.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7c804616b5b1115fc1323fa04b701adb253c5b6381fd04e3998370fa385b5a15",
"md5": "c3bec413862cddcd700e9cee66edffba",
"sha256": "954e870cb7f4dc76ce04501d2972e0bd08268804208b744422c61cfc1843aac9"
},
"downloads": -1,
"filename": "Mastodon-Reader-0.3.1.tar.gz",
"has_sig": false,
"md5_digest": "c3bec413862cddcd700e9cee66edffba",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 378323,
"upload_time": "2024-03-19T10:19:54",
"upload_time_iso_8601": "2024-03-19T10:19:54.363471Z",
"url": "https://files.pythonhosted.org/packages/7c/80/4616b5b1115fc1323fa04b701adb253c5b6381fd04e3998370fa385b5a15/Mastodon-Reader-0.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-19 10:19:54",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "mastodon-reader"
}