Is there open database with English words with grammatical classification?
I mean the list of words, with the information, which part of speech this word is (f.e. verb, noun, pronoun etc.).
Check out Natural Language Toolkit it is written in Python and has those corpora available for download. It is one of the most popular packages to work with human languages data.
If you prefer to use web based API, take a look at Wordnik API