artist-getter


Nameartist-getter JSON
Version 0.2 PyPI version JSON
download
home_pagehttps://github.com/fangyizhu/artist-getter
SummaryGetty ULAN and WikiData scraping utilities for artists
upload_time2024-06-14 03:16:17
maintainerNone
docs_urlNone
authorJay Mollica, Fangyi Zhu
requires_pythonNone
licenseNone
keywords getty art ulan wikidata artist artwork museums
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Artist Getter

Building on top of [sfmoma/getty-getter](https://github.com/sfmoma/getty-getter) to retrieve artist information from
both Getty ULAN and WikiData.

## Getty Getter

A script developed by SFMOMA for associating artists with the Getty ULAN vocabulary and gathering additional metadata
based on an artist's ULAN.

The ULAN vocabulary is a wealth of information regarding people and organizations involved in art and culture. More
about ULAN can be found [here](http://www.getty.edu/research/tools/vocabularies/ulan/about.html).

### Usage

This script is a work in progress. Right now there are four basic functions.

#### 1. get_getty_ulan

`get_getty_ulan` which consumes and artist's name (formatted    `u'Last, First'`) and does a best guess match against
similar names in the Getty ULAN vocabulary. The returned data will include the name of the artist or organization, the
ULAN, the "type" og thing returned (e.g. person, organization etc) and a scope note, which is a brief summary of the
artist's career.

`get_getty_ulan(u"Stieglitz, Alfred")`

```
{'scopenote': u'Renowned photographer Stieglitz first studied photochemistry with Hermann Wilhelm Vogel at the Technische Hochschule in Berlin, from 1882-1886, and took his first photographs in 1883. He continued to travel and photograph in Germany, Austria, and Switzerland until 1890, when he returned to New York City. From 1890 to 1895 he was a partner in a photogravure firm. During this time he concentrated on photographing the streets of New York City. In 1894, Stieglitz travelled to Europe and was elected a member of the Linked Ring, a pictorialist society in London. In 1902, Stieglitz founded the Photo-Secession Movement which attempted to prove that pictorialist photography was a fine art form. From 1903 to 1917, Stieglitz was publisher and director of Camera Work magazine. The graphic section was run by Edward Steichen (1879-1973). In 1905, Stieglitz opened the Little Galleries of the Photo-Secession "291" on Fifth Avenue in New York City with Steichen. The galleries operated until 1917. In 1907, Stieglitz exhibited his autochrome photographs. Stieglitz stopped photographing in 1937. During his lifetime, Stieglitz was also a close friend and collaborator of Joseph T. Keiley. Together they invented the glycerine process which permitted partial development of platinum papers. Also, they produced joint research on the history of photography. Keiley also acted as the associate editor of Stieglitz\'\'s publications "Camera Notes" and "Camera Works". American photographer.', 'ulan': u'500024301', 'type': u'Persons, Artists', 'term': u'Stieglitz, Alfred'}
```

#### 2. get_getty_relationship

`get_getty_relationship` which consumes an artist's ULAN and returns a list of the relationships that artist had with
other artists in the ULAN vocabulary. The `object_ulan` being the ULAN of the related person or organization.
`get_getty_relationship("500024301")`

```
{'relationship_type': u'student of', 'object_ulan': u'500063166'}{'relationship_type': u'influenced', 'object_ulan': u'500007426'}{'relationship_type': u'colleague of', 'object_ulan': u'500004441'}{'relationship_type': u'collaborated with', 'object_ulan': u'500001336'}{'relationship_type': u'collaborated with', 'object_ulan': u'500000431'}{'relationship_type': u'spouse of', 'object_ulan': u'500018666'}{'relationship_type': u'friend of', 'object_ulan': u'500070483'}
```

#### 3. get_getty_artist_name

`get_getty_artist_name` which consumes an ULAN and returns just the artist's name formatted `Last, First`.
`get_getty_artist_name("500024301")`
```Stieglitz, Alfred```

#### 4. get_getty_artist_data

`get_getty_artist_data` which consumes an ULAN and returns entire set of data from given ulan as a dictionary.
`get_getty_artist_data("500024301")`

```
{
'@context': 'https://linked.art/ns/v1/linked-art.json',
'_label': 'Stieglitz, Alfred',
'born': { 'id': 'http://vocab.getty.edu/ulan/activity/birth/4000062133',
'timespan': { 'begin_of_the_begin': '1864-01-01T00:00:00',
    'end_of_the_end': '1864-12-31T23:59:59',
    'id': 'http://vocab.getty.edu/ulan/time/birth/4000062133',
    'type': 'TimeSpan' },
'took_place_at': [ { '_label': 'Hoboken',
    'id': 'http://vocab.getty.edu/tgn/7013711-place',
    'type': 'Place' } ],
...
```

The dictionary is parsed from [this json file on ULAN](http://vocab.getty.edu/ulan/500024301.json)

### Installation

`pip install artist-getter`

Getty Getter was built on Django 1.8 and Python 3.12.

### Example View

```python
from django.views.generic.base import View
from django.http import HttpResponse
from artist_getter import *
import json


class GetUlanView(View):
    def get(self, request):
        artist_ulan = json.dumps(get_getty_ulan(u"Stieglitz, Alfred"))

        return HttpResponse(artist_ulan, content_type="application/json")
```

### Build & Release

For maintainers of this package only.

Download setuptools:
`pip install --upgrade setuptools`

Run this command to build package:
`python -m build`

Run this if building on Windows:
`py -m build`

Run checks before releasing to PyPI:
`twine check --strict dist/*`

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/fangyizhu/artist-getter",
    "name": "artist-getter",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "Getty Art ULAN WikiData Artist Artwork Museums",
    "author": "Jay Mollica, Fangyi Zhu",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/fb/71/cdfe318be2e6caba2bc8366985c190ae0b2c246ad975ffb3a167a8374fae/artist_getter-0.2.tar.gz",
    "platform": null,
    "description": "# Artist Getter\n\nBuilding on top of [sfmoma/getty-getter](https://github.com/sfmoma/getty-getter) to retrieve artist information from\nboth Getty ULAN and WikiData.\n\n## Getty Getter\n\nA script developed by SFMOMA for associating artists with the Getty ULAN vocabulary and gathering additional metadata\nbased on an artist's ULAN.\n\nThe ULAN vocabulary is a wealth of information regarding people and organizations involved in art and culture. More\nabout ULAN can be found [here](http://www.getty.edu/research/tools/vocabularies/ulan/about.html).\n\n### Usage\n\nThis script is a work in progress. Right now there are four basic functions.\n\n#### 1. get_getty_ulan\n\n`get_getty_ulan` which consumes and artist's name (formatted    `u'Last, First'`) and does a best guess match against\nsimilar names in the Getty ULAN vocabulary. The returned data will include the name of the artist or organization, the\nULAN, the \"type\" og thing returned (e.g. person, organization etc) and a scope note, which is a brief summary of the\nartist's career.\n\n`get_getty_ulan(u\"Stieglitz, Alfred\")`\n\n```\n{'scopenote': u'Renowned photographer Stieglitz first studied photochemistry with Hermann Wilhelm Vogel at the Technische Hochschule in Berlin, from 1882-1886, and took his first photographs in 1883. He continued to travel and photograph in Germany, Austria, and Switzerland until 1890, when he returned to New York City. From 1890 to 1895 he was a partner in a photogravure firm. During this time he concentrated on photographing the streets of New York City. In 1894, Stieglitz travelled to Europe and was elected a member of the Linked Ring, a pictorialist society in London. In 1902, Stieglitz founded the Photo-Secession Movement which attempted to prove that pictorialist photography was a fine art form. From 1903 to 1917, Stieglitz was publisher and director of Camera Work magazine. The graphic section was run by Edward Steichen (1879-1973). In 1905, Stieglitz opened the Little Galleries of the Photo-Secession \"291\" on Fifth Avenue in New York City with Steichen. The galleries operated until 1917. In 1907, Stieglitz exhibited his autochrome photographs. Stieglitz stopped photographing in 1937. During his lifetime, Stieglitz was also a close friend and collaborator of Joseph T. Keiley. Together they invented the glycerine process which permitted partial development of platinum papers. Also, they produced joint research on the history of photography. Keiley also acted as the associate editor of Stieglitz\\'\\'s publications \"Camera Notes\" and \"Camera Works\". American photographer.', 'ulan': u'500024301', 'type': u'Persons, Artists', 'term': u'Stieglitz, Alfred'}\n```\n\n#### 2. get_getty_relationship\n\n`get_getty_relationship` which consumes an artist's ULAN and returns a list of the relationships that artist had with\nother artists in the ULAN vocabulary. The `object_ulan` being the ULAN of the related person or organization.\n`get_getty_relationship(\"500024301\")`\n\n```\n{'relationship_type': u'student of', 'object_ulan': u'500063166'}{'relationship_type': u'influenced', 'object_ulan': u'500007426'}{'relationship_type': u'colleague of', 'object_ulan': u'500004441'}{'relationship_type': u'collaborated with', 'object_ulan': u'500001336'}{'relationship_type': u'collaborated with', 'object_ulan': u'500000431'}{'relationship_type': u'spouse of', 'object_ulan': u'500018666'}{'relationship_type': u'friend of', 'object_ulan': u'500070483'}\n```\n\n#### 3. get_getty_artist_name\n\n`get_getty_artist_name` which consumes an ULAN and returns just the artist's name formatted `Last, First`.\n`get_getty_artist_name(\"500024301\")`\n```Stieglitz, Alfred```\n\n#### 4. get_getty_artist_data\n\n`get_getty_artist_data` which consumes an ULAN and returns entire set of data from given ulan as a dictionary.\n`get_getty_artist_data(\"500024301\")`\n\n```\n{\n'@context': 'https://linked.art/ns/v1/linked-art.json',\n'_label': 'Stieglitz, Alfred',\n'born': { 'id': 'http://vocab.getty.edu/ulan/activity/birth/4000062133',\n'timespan': { 'begin_of_the_begin': '1864-01-01T00:00:00',\n    'end_of_the_end': '1864-12-31T23:59:59',\n    'id': 'http://vocab.getty.edu/ulan/time/birth/4000062133',\n    'type': 'TimeSpan' },\n'took_place_at': [ { '_label': 'Hoboken',\n    'id': 'http://vocab.getty.edu/tgn/7013711-place',\n    'type': 'Place' } ],\n...\n```\n\nThe dictionary is parsed from [this json file on ULAN](http://vocab.getty.edu/ulan/500024301.json)\n\n### Installation\n\n`pip install artist-getter`\n\nGetty Getter was built on Django 1.8 and Python 3.12.\n\n### Example View\n\n```python\nfrom django.views.generic.base import View\nfrom django.http import HttpResponse\nfrom artist_getter import *\nimport json\n\n\nclass GetUlanView(View):\n    def get(self, request):\n        artist_ulan = json.dumps(get_getty_ulan(u\"Stieglitz, Alfred\"))\n\n        return HttpResponse(artist_ulan, content_type=\"application/json\")\n```\n\n### Build & Release\n\nFor maintainers of this package only.\n\nDownload setuptools:\n`pip install --upgrade setuptools`\n\nRun this command to build package:\n`python -m build`\n\nRun this if building on Windows:\n`py -m build`\n\nRun checks before releasing to PyPI:\n`twine check --strict dist/*`\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Getty ULAN and WikiData scraping utilities for artists",
    "version": "0.2",
    "project_urls": {
        "Homepage": "https://github.com/fangyizhu/artist-getter"
    },
    "split_keywords": [
        "getty",
        "art",
        "ulan",
        "wikidata",
        "artist",
        "artwork",
        "museums"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "87d9d3a0c6f97746a24211a1d3f475d129d490d12da6d919c51e62b1846d08ff",
                "md5": "04d4176562a80edc4bf73c3caf4aa24b",
                "sha256": "f4278cff8b9804836fe2fe2e18063d06f19295ff6777cd72dd6a2fa41c78ea16"
            },
            "downloads": -1,
            "filename": "artist_getter-0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "04d4176562a80edc4bf73c3caf4aa24b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5399,
            "upload_time": "2024-06-14T03:16:16",
            "upload_time_iso_8601": "2024-06-14T03:16:16.295456Z",
            "url": "https://files.pythonhosted.org/packages/87/d9/d3a0c6f97746a24211a1d3f475d129d490d12da6d919c51e62b1846d08ff/artist_getter-0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fb71cdfe318be2e6caba2bc8366985c190ae0b2c246ad975ffb3a167a8374fae",
                "md5": "1db5f230f5bff5f3b7a02537f18b3f6a",
                "sha256": "d8516fa05e65825085122689a770a2c4661cc0196bd8cb7dc6692cf2d970e0c8"
            },
            "downloads": -1,
            "filename": "artist_getter-0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "1db5f230f5bff5f3b7a02537f18b3f6a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5261,
            "upload_time": "2024-06-14T03:16:17",
            "upload_time_iso_8601": "2024-06-14T03:16:17.850707Z",
            "url": "https://files.pythonhosted.org/packages/fb/71/cdfe318be2e6caba2bc8366985c190ae0b2c246ad975ffb3a167a8374fae/artist_getter-0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-14 03:16:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fangyizhu",
    "github_project": "artist-getter",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "artist-getter"
}
        
Elapsed time: 1.54870s