Pywikibot uses family files for predefined site configurations. Wikidata and Commons have configurations for beta sites, but Metawiki (https://meta.wikimedia.beta.wmcloud.org) doesn't have one, and it should be added to the configuration as well.
Documentation
- T407059 - Pywikibot contribution howto
- Pywikibot: Family Config Files
- Manual:Pywikibot/Use on third-party wikis
Target family file
Example configurations
Change required
Adding langs and test_codes definitions to meta_family.py, similarly to how they are defined in wikidata_family.py and commons_family.py, should be enough.
Test code
Create account to https:// meta.wikimedia.beta.wmcloud.org and test that login works with following code
import pywikibot
site = pywikibot.Site("beta", "meta")
site.login()
print(site.user())