import pywikibot
import pywikibot.pagegenerators as pg

query='select ?item where {?item wdt:P31 wd:Q5 . ?item wdt:P410 ?rang . OPTIONAL {?item wdt:P106 ?beroep} . ?item wdt:P27 ?nationaliteit .  FILTER(!bound(?beroep)) }'

print(dir(pg.ProofreadPage))
site=pywikibot.Site('nl','wikipedia')
p=pywikibot.Page(site,'Enrique Cadícamo')
print(pg.ProofreadPage.not_proofread(p))
['NOT_PROOFREAD', 'PROBLEMATIC', 'PROOFREAD', 'PROOFREAD_LEVELS', 'VALIDATED', 'WITHOUT_TEXT', '_FMT', '_GOCR_CMD', '_GOOGLE_OCR', '_HOCR_CMD', '_MULTI_PAGE_EXT', '_OCR_CMD', '_OCR_CMDS', '_OCR_METHODS', '_PHETOOLS', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__unicode__', '__weakref__', '_cache_attrs', '_cmpkey', '_compose_page', '_cosmetic_changes_hook', '_create_empty_page', '_decompose_page', '_do_hocr', '_do_ocr', '_fmt', '_getInternals', '_get_parsed_page', '_latest_cached_revision', '_ocr_callback', '_page_to_json', '_parse_title', '_save', 'applicable_protections', 'aslink', 'autoFormat', 'backlinks', 'body', 'botMayEdit', 'canBeEdited', 'categories', 'change_category', 'clear_cache', 'close_tag', 'content_model', 'contributingUsers', 'contributors', 'coordinates', 'create_short_link', 'data_item', 'data_repository', 'decompose', 'defaultsort', 'delete', 'depth', 'editTime', 'embeddedin', 'encoding', 'exists', 'expand_text', 'extlinks', 'footer', 'fullVersionHistory', 'full_url', 'get', 'getCategoryRedirectTarget', 'getCreator', 'getDeletedRevision', 'getLatestEditors', 'getMovedTarget', 'getOldVersion', 'getRedirectTarget', 'getReferences', 'getRestrictions', 'getTemplates', 'getVersionHistory', 'getVersionHistoryTable', 'header', 'image_repository', 'imagelinks', 'index', 'interwiki', 'isAutoTitle', 'isCategory', 'isCategoryRedirect', 'isDisambig', 'isEmpty', 'isFlowPage', 'isImage', 'isIpEdit', 'isRedirectPage', 'isStaticRedirect', 'isTalkPage', 'is_categorypage', 'is_filepage', 'is_flow_page', 'iterlanglinks', 'itertemplates', 'langlinks', 'lastNonBotUser', 'latestRevision', 'latest_revision', 'latest_revision_id', 'linkedPages', 'loadDeletedRevisions', 'markDeletedRevision', 'merge_history', 'move', 'moved_target', 'namespace', 'not_proofread', 'ocr', 'oldest_revision', 'open_tag', 'p_close', 'p_open', 'pageAPInfo', 'page_image', 'pageid', 'permalink', 'pre_summary', 'preloadText', 'previousRevision', 'previous_revision_id', 'problematic', 'proofread', 'properties', 'protect', 'protection', 'purge', 'put', 'put_async', 'ql', 'quality_level', 'raw_extracted_templates', 'revision_count', 'revisions', 'save', 'section', 'sectionFreeTitle', 'set_redirect_target', 'site', 'status', 'templates', 'templatesWithParams', 'text', 'title', 'titleForFilename', 'titleWithoutNamespace', 'toggleTalkPage', 'touch', 'undelete', 'url_image', 'urlname', 'user', 'userName', 'validate', 'version', 'watch', 'without_text']
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-12-d9bc037d15f2> in <module>()
      7 site=pywikibot.Site('nl','wikipedia')
      8 p=pywikibot.Page(site,'Enrique Cadícamo')
----> 9 print(pg.ProofreadPage.not_proofread(p))

/srv/paws/pwb/pywikibot/proofreadpage.py in not_proofread(self)
    359     def not_proofread(self):
    360         """Set Page QL to "Not Proofread"."""
--> 361         self.ql = self.NOT_PROOFREAD
    362 
    363     def proofread(self):

AttributeError: 'Page' object has no attribute 'NOT_PROOFREAD'