Generally speaking, you will not need to generate this yourself. Simply use the official PyPI package
via pip install --update meraki
.
However, if you participate in Early Access features, you may want to generate a library to match your org's spec. In which case, follow along.
NB: The generator requires Python 3.10 or later.
- Clone this repo locally.
- Open a terminal in this
generator
folder. - Optional: If you want to work with beta endpoints, then first review the warnings, and then opt one of your orgs into the Early API Access program.
- Run
python generate_library.py -v locally_generated -o YOUR_ORG_ID -k YOUR_API_KEY
making these replacements:
- Replace
YOUR_ORG_ID
with the org ID you want to use as reference. Use the one opted into Early API access if you want the beta endpoints. - Replace
YOUR_API_KEY
with an API key that has org admin privileges on that org. - NB: Your local system may require minor syntax tweaks (e.g. Windows may require you prepend
generate_library.py
with.\
)
- You will now have a
meraki
module folder insidegenerator
, which you can locally reference in your scripts. Simply copy themeraki
folder to those projects which require it. - In some cases, if you've already installed the official library, your scripts may prefer that one over the local folder. If that happens, then calls to early access endpoints will fail. So, if necessary, uninstall any instances of the meraki package that may have been installed in your venv or system, or replace the version installed in your venv with that which you generated here.