import urllib.request as ur


def uniprot2seq(ProteinID):
	"""Get protein sequence from Uniprot ID
	
	Parameters
	----------
	ProteinID : str
	    Uniprot ID
	
	Returns
	-------
	str
	    Amino acid sequence of input uniprot ID
	"""

	ID = str(ProteinID)
	localfile = ur.urlopen('http://www.uniprot.org/uniprot/' + ID + '.fasta')
	temp = localfile.readlines()
	res = ''
	for i in range(1, len(temp)):
		res = res + temp[i].strip().decode("utf-8")
	return res