You can use the functionality from astropy:
from astropy.coordinates import name_resolve
coords = name_resolve.get_icrs_coordinates('Cyg A') # Cygnus A
Print the coordinate object:
print coords
<SkyCoord (ICRS): (ra, dec) in deg
(299.8681525, 40.7339156)>
Or access RA and Dec directly:
print coords.ra, coords.dec
299d52m05.349s 40d44m02.0962s
In decimal format:
print coords.ra.value, coords.dec.value
299.8681525 40.7339156
You can also represent them e.g. in Galactic frame:
print coords.galactic
<SkyCoord (Galactic): (l, b) in deg
(76.18988044, 5.75538777)>
Or as decimal values:
print coords.galactic.l.value, coords.galactic.b.value
76.1898804421 5.75538777496