Skip to main content

Python wrapper for Cleveland Museum of Art Open Access API

Project description

CMA

Python wrapper for the Cleveland Museum of Art API.

Install

pip install ClevelandMuseumArt

CLI Examples

List artwork with filters
cma artwork list --female_artists --created_after 1998 --limit 10

Get artwork by ID
cma artwork get --id 1944.485 --preview

################################################################################
###############################*******************##############################
#########################*********************************######################
#################**********************************************#################
############********************************************************############
########****************************************************************########
###**************************************************************************###
*************************************++*****************************************
***********######*+#*+++*+**++=+***++++=++-*++++++++*=+*++++***##%%*************
***********#*****+***+*++++++==+***++==+=+==++-=+++=++=*==++****##%*************
***********#****+***++*+=+=++==++===+=+**++=====+=**+*++=++***+*##%*************
***********######***#+*+**+++==+++==+=++++=++=+=+++++++++******####*++**********
+++++++++++++***+***+******+++**+*****++++=+**++++++++******###**+++++++++++++++
==============+******+++**+++**++**++++*++****+=+**+++++*++****+===============+
===-----------==+*****++++*++++++*+++++++++++++*+++*+++++***+==------------=====
-------------:::-=+***********++**++++*+++=-*=++++**++++*=++=-::::::------------
:::::::::::::::::::-=+***#***********+++***+*******+=++*+=-:::::::::::::::::::::
:::::::::::::::.......:--=+***#############%#%###*++==-:...............:::::::::
............................::-*####%##########*=:..............................
..............................:*******+**+****#*-...............................
..........:::::::::::::::::::-*##*#***+*=***#*###-:::::::::.....................
......:::::::::::::::::::::=*%##%%%%%%#%#%#%%%%%%%#+::::::::::..................
.............:::::::::::::::--=====++++++++=====--::::..........................
................................................................................
................................................................................

Python Examples

from CMA.api import Handler

artwork_id = 1953.424
creator_id = 7978
exhibit_id = 206339

cma = Handler()

# get artwork, creator, or exhibition by ID
artwork = cma.get_artwork(rid=artwork_id, preview=True)
creator = cma.get_creator(rid=creator_id)
exhibit = cma.get_exhibition(rid=exhibit_id)

# list artwork, creator, or exhibition with filters
artworks = cma.list_artworks(limit=3, female_artists=True)
creators = cma.list_creators(limit=3, birth_year_after=1980)
exhibits = cma.list_exhibitions(limit=3, opened_before='2020-12-31')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ClevelandMuseumArt-1.0.0.tar.gz (7.7 kB view hashes)

Uploaded Source

Built Distribution

ClevelandMuseumArt-1.0.0-py3-none-any.whl (10.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page