meraki / dashboard-api-python

Official Dashboard API library (SDK) for Python
MIT License
293 stars 154 forks source link

Meraki References root #187

Closed CamoDunn closed 2 years ago

CamoDunn commented 2 years ago

meraki init file seems to be referencing root instead of lib.location. This was causing problems when creating exe from pyinstaller.

Without hooks, modified calls for ease.

from

from .rest_session import * from .api.organizations import Organizations etc.

to

from meraki.rest_session import * from meraki.api.organizations import Organizations etc..

TKIPisalegacycipher commented 2 years ago

Hi @CamoDunn,

This doesn't seem to be an issue with the SDK since most folks don't use pyinstaller.

What is the purpose of creating an exe using pyinstaller?

CamoDunn commented 2 years ago

I'm a little new to this, but it was to compile and share with team for pull requests.

thomaschristory commented 2 years ago

pyinstaller support would be nice.

We have a custom script to configure ports, it would be much easier to make it an executable.

On Tue 5 Apr 2022 at 19:06, CamoDunn @.***> wrote:

I'm a little new to this, but it was to compile and share with team for pull requests.

— Reply to this email directly, view it on GitHub https://github.com/meraki/dashboard-api-python/issues/187#issuecomment-1089053149, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHCZ6AAIW4VX6YKN23MHADVDRXHPANCNFSM5STMHI7A . You are receiving this because you are subscribed to this thread.Message ID: @.***>

TKIPisalegacycipher commented 2 years ago

Thanks, I'm still not sure I 100% understand the real-world benefits of this. Can you go into more detail why we'd want this?

CamoDunn commented 2 years ago

If I want to dump current status of all Meraki WANs and IP's or Pull information quickly into CSV for reporting, or checking on even subnetting on all offices then it would be the fastest, if I can provide that as an exe for other internal users on my team to run only needing to provide an API then it is the quickest way. We have many offices within templates, so if I want to quickly dump the subnets used by each VLAN at each office for reference I can do so and so can my team, without the need for giving them new things to learn or run.

Edit: I just use for pull requests as of right now

TKIPisalegacycipher commented 2 years ago

In this example, do those other users have API keys? How do those other users get API keys to run the EXE?

CamoDunn commented 2 years ago

Once I actually pass it out, I would likely have a few options, They can either pull the API when they need it from our Password Manager and paste on request as this first call has a menu with functions returning based on the request. I could have the option to set it on a server to run with an environment variable Or if possible to pull an encrypted password through our password manager I could create a call to pull it once they login as the domain credentials tie their permissions to passwords.

thomaschristory commented 2 years ago

I have a different use case (I could really find 5 or 6, but given it wasn't working, I left the ideas out) : We don't use templates on our networks, not flexible enough, and I don't want to give support people access to the dashboard, configuring a port is too complicated for some(many). Thus I designed my own template system and I need a interface for my users to use it. I have a cli script right now, even that is hard for some. Thus, I would like to make an executable with a basic gui that could be run on any os, this way it's click click as people like.

/T

TKIPisalegacycipher commented 2 years ago

Got it. This makes sense. We accept community PRs. If you'd like to implement this, please submit a PR with the changes for consideration.