ClevelandMuseumArt 1.0.1
Python wrapper for Cleveland Museum of Art Open Access API

# CMA

Python wrapper for the Cleveland Museum of Art API.

### Install
`pip install ClevelandMuseumArt`

### CLI Examples
Get random artwork preview  
`cma artwork get --random --preview`
```
Title: Nataraja, Shiva as the Lord of Dance
Type: Sculpture
Creator:
Culture: South India, Tamil Nadu, Chola period (900-1200s)
Link: https://openaccess-cdn.clevelandart.org/1930.331/1930.331_web.jpg
Preview:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@@@@@@@@
@@@@@@@@@@@@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@@@@@
@@@@@@@@@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@
@@@@@@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%###%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@@@%%%%%%%%%%%%%%%%%%%%%%%%#%%%##%%%%###%%%#**%%###%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@%%%%%%%%%%%%%%%%%%%%%%#%%%**%##***************###*%%%%*#%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%####*+++*##%%########%%####******##%%%##%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%**#%#+++*#%%%%%%%*++*#%%%%%%%%%%%%###****##*##%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%##%%#++=+*%%%%%%%%%%+++++**%%%%%%%%%%######*****########%%%%%%%%%%%
%%%%%%%%%%%%%**#*=+*%%%%%%%%%%%%%#*+++*##%###################****##########%%%%%
%%%%%%%%%%#%%#+=+#%%%%%%%%%%%%%%%%#*+++**#######################**#############%
%%%%%%%%%#***=+#%%%%%%%%%%%%%%%%%##+*+++#%%####################**#***###########
%%%%%%%#%%#++*#%%%%%%%%%%%%%%#####*+**++#%%%####******************#####**#######
%%%%%%#***=+++*%%#*#%%%%%#########*+###*%%@%#***************************###**###
%%%%%%%%#++***++**#%%%#########*+++===*###*+*++++*****************##***#********
%%%%#**#++*#%%%#*#%#########*+===++++++++===++*#%#*+++++++++++**++####*#*+*#****
%%%%%%%*++##%%%##%%%%%%###***=-+*#%#++++++*#%%%%@@%++++++++++##*+++**%*##*******
%%%%##%++*##%######%%%%%#++**+#%#*****##%%%@@@#+**#%**++==+*%*+++++++*@@%#++++++
%%%###*++#############%%*#*%%***#%%%%#%#*+%@@@#+++==+*****##+========+@@%%%##+++
%%%%%%#++###########*****##*++#***+++++*##%@@@%#*+======+*+===========*%@@*+++++
%%%##**+*########*************+++++++==+*+***#**+**========-==========+*#%#*#+==
%%%####**######*********++##*++++====-+****########*------------------+**%***===
%######**###*********++++++++=======+*%%%%%%%%%%%%#=------------------++#%=+=--=
########*##*******++++++++========+*%%#+=+*%%#+----::::::::::::::::---+*%#**+---
#####*****#****++++++++========+*#%#**++*#%%=::::::::::::::::::::::::=+#%=------
#########*##**++++++=========+##*=-=++*#%%+-::::::::::::::::::::::::-+*%****=---
####*******#**++++===+++==+*#%*---=+*#%#=::::::::::...:::::::::::::-++##--------
##*****######**+======+*+++=-=-:-==+##=::::::..:::::::::::::-------++##***+=----
#*******+++*###*+===---------::::+**##-:::::::::---::::::::::::::-+*##==+=--::::
******+++*##*###*+=-=-----::::::::=**##+:::-----::::...........:=+*%#++*=--:::::
*****+++++++++#####*#---:::::::::::=####+--:::.............-.:==*%%+=+*+---:::::
****+++++===*#*+*#####=-::::::::::--=**##-:...............:+=**#%#++--------::::
***++++++======--+######+-::::---==--:+###:::::::::::::-==++*#%#=+*+-----=------
**++++++======-----+######*+==+++=::.:=*#%%=--------===++*###+=---------========
**+++++======---------+####**+*+*#**#%%@@@%#+*********##%#+-:-----=========---::
**+++++======-----------=*##**+*###%@%#%%##*#%%*+*###**+=--====--========--::...
*++++++=======------====+++++++++*####*##**++##*+*#*=------------=====--::....::
**++++++=======------====+++*+*************#*#######-----====----------:::------
******++++++++========---=+**++*****#*++++++*#**#####*=-------::::::::::::::::::
####*********+++++++++++==++++********+++++++*++++++=----:::::------------------
######****************+++++++++=================================================
```

List artwork with filters  
`cma artwork list --female_artists --created_after 1998 --limit 1`
```json
[
    {
        "id": 172524,
        "accession_number": "2015.30",
        "share_license_status": "Copyrighted",
        "tombstone": "Wild Things, 2011. Haim Steinbach (American, 1944-). Plastic laminated wood shelf, plastic Massimo Giancon \"Mr. Cold\" soap dispenser, vinyl \"Mega Munny,\" vinyl bull \"Where the Wild Things Are\" figure, rubber dog chew; overall: 102.9 x 184.8 x 48.3 cm (40 1/2 x 72 3/4 x 19 in.). The Cleveland Museum of Art, Purchased with funds donated by Scott Mueller 2015.30",
        "current_location": "ArtLens Exhibition A",
        "title": "Wild Things",
        "title_in_original_language": null,
        "series": null,
        "series_in_original_language": null,
        "creation_date": "2011",
        ...snip...
    }
]
```

  
### Python Examples
```python
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')
```