# Reference/API

pyregion: a Python parser for ds9 region files

- Code : https://github.com/astropy/pyregion

- Docs : http://pyregion.readthedocs.io/

See also the in-development `regions` package at https://github.com/astropy/regions a new astronomy package for regions based on Astropy.

## Functions

`get_mask`(region, hdu[, origin]) | Get mask.
`open`(fname) | Open, read and parse DS9 region file.
`parse`(region_string) | Parse DS9 region string into a ShapeList.
`test`(**kwargs) | Run the tests for the package.

## Classes

`Shape`(shape_name, shape_params) | Shape.
`ShapeList`(shape_list[, comment_list]) | A list of `Shape` objects.