This message was deleted.
# infisical-feedback
s
This message was deleted.
v
Tagging @Daniel Hougaard because he might have some thoughts here
p
Interesting I found that the python SDK was to limited for our needs (no machine/client id creation for a start) so I wrote a simple python api sdk to use instead of the official one
j
Yeah, I had a hard time wrapping my head around the SDK's python source code. Spent a day feeding ChatGPT with API docs to build Pydantic models for everything and then built a generic API framework to plug those models into. I've been wrapping a lot of API's with async clients lately so getting better at it.
p
I'm not really a programmer (more of a sysadmin) so the official sdk was to much for me plus that I didn't like the way it works, (having to pass a pile of redundant info at each call) but the trigger was that we need to create a lot of machineIDs in the app and that isn't even there.
j
Knowing there are other python users facing the same challenge is compelling. I'm not really a fan of open sourcing something like that without good tests which I need to write for my own use anyhow. I'll likely release it sometime soon.
I will say the current state of the Infisical API was a fun test case for building a mini API client framework. Like some resource types use different API versions, path params, and query params across endpoints. Inconsistencies between endpoints for the same resource on request and response models. It was fun 🙂
p
I want to release mine under GPL but haven't received the official permission yet
FYI - my functions:
Copy code
def __init__(self,Settings,Debug=False):
    def login(self,client_id=ClientSettings['client_id'],client_secret=ClientSettings['client_secret']):
    def list_folders(self,PATH="/"):
    def create_folder(self,PATH,NAME):
    def delete_folder(self,PATH,NAME):
    def create_project(self,name):
    def delete_project(self,name):
    def list_projects(self):
    def create_secret(self,PATH,SECRET_NAME,SECRET_VALUE,COMMENT=""):
    def create_secret_bulk(self,PATH,VALUES):
    def update_secret_bulk(self,PATH,VALUES):
    def delete_secret_bulk(self,PATH,VALUES):
    def list_secret(self,PATH,recursive=False,imports=False):
    def update_secret(self,PATH,SECRET_NAME,SECRET_VALUE,COMMENT=""):
    def delete_secret(self,PATH,SECRET_NAME):
    def retrieve_secret(self,PATH,SECRET_NAME):
    def create_machineId(self,machineId_name,ROLE="no-access"):
    def attach_auth_machineId(self,machineId_name,options=""):
    def update_auth_machineId(self,machineId_name,options=""):
    def get_machineId_id(self,machineId_name):
    def list_machineId(self):
    def delete_machineId(self,machineId_name):
    def attach_machineId(self,machineId_name,ROLE="no-access",PROJECT=ClientSettings['project_name']):
    def update_machineId(self,machineId_name,ROLE="no-access",PROJECT=ClientSettings['project_name']):
    def detach_machineId(self,machineId_name,PROJECT=ClientSettings['project_name']):
    def add_priv_access(self,machineId_name,privs=[],PROJECT=ClientSettings['project_name']):
    def delete_priv_access(self,machineId_name,priv_slug,PROJECT=ClientSettings['project_name']):
    def list_priv_access(self,machineId_name,PROJECT=ClientSettings['project_name']):
    def create_client(self,machineId_name,options={}):
    def list_client(self,machineId_name):
    def get_client(self,machineId_name,clientSecret_comment):
    def get_clientId(self,machineId_name):
    def revoke_client(self,machineId_name,clientSecret_comment):
    def check_login(self):
    def check_org_id(self):
    def get_project_id(self,PROJECT=None):
    def get_settings(self):
    def check_status(self,response):
d
Hi @Jason Lantz. The idea behind our Python SDK is that we're trying to keep SDK overhead to a minimum. It uses bindings generated from a Rust codebase (you can read more in the github.com/infisical/sdk repo). I would love to talk about potentially implementing async behavior in the Python SDK. Please feel free to shoot me a message!