Skip to content

Reorganization of the wrapper by apps #259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 13 commits into
base: a_new_way
Choose a base branch
from

Conversation

FBoissadier
Copy link
Contributor

I would like to share the reorganization by app I started, I've talk a bit of it on telegram.
It's still in progress because there is a lot of think to do ^^' And I didn't get so much time now !
Maybe if you think it's a good idea you can merge it to a new branch, I think it sould not be in the master because it's not finished !

Here is a example of what would be the end user usage :

from synology_api.DSM import DSM
from decouple import config

USERNAME = config('USERNAME')
PASSWORD = config('PASSWORD')
IP = config('IP')
PORT = config('PORT')

dsm = DSM(
    IP,
    PORT,
    USERNAME,
    PASSWORD,
    secure=False,
    cert_verify=False,
    dsm_version=7,
    debug=True,
    otp_code=False
)

configs = [
    {
        "ifname": "ovs_eth1",
        "use_dhcp": True,
        "enable_ha_ip": False,
        "is_default_gateway": False,
        "mtu": 1500,
        "enable_vlan": False
    }
]
dsm.FileStation.get_info()
dsm.ControlPanel.InfoCenter.get_system_info()
dsm.ControlPanel.Network.get_ethernet_interface_list()
dsm.PackageCenter.get_package_center_infos()
dsm.PackageCenter.list_installed()





@FBoissadier FBoissadier marked this pull request as draft July 5, 2025 23:00
@N4S4
Copy link
Owner

N4S4 commented Jul 6, 2025

Hello I like that although is much less user intuitive, but I like the concept of using one configuration for all. I'll create another branch and we move from there

@FBoissadier
Copy link
Contributor Author

FBoissadier commented Jul 6, 2025

For the fact that it less user intuitive, goal is to organize the wrapper based on the DSM desktop :) For app I have done it per app, but for example I think for Surveillance Station we should do it same as Control Panel. But yeah for current user of the wrapper it will be less intuitive.
By the way you can still use each class individually if needed, just you need to init them with the IP, Port etc...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants