pymaid.connect_catmaid

pymaid.connect_catmaid(**kwargs)[source]

Connect to CATMAID server using environmental variables.

Pulls credentials from environmental variables and feeds them to CatmaidInstance.

  • CATMAID_SERVER for server (required)

  • CATMAID_HTTP_USER for http_user (optional)

  • CATMAID_HTTP_PASSWORD for http_password (optional)

  • CATMAID_API_TOKEN for api_token (optional)

User **kwargs to override those.

Parameters

**kwargs – Keyword arguments passed to CatmaidInstance.

Return type

CatmaidInstance

Examples

This assumes you have stored credentials as environment variables >>> import pymaid >>> # Initialize connection with stored credentials >>> con1 = pymaid.connect_catmaid() >>> # Same server, different project >>> con2 = pymaid.connect_catmaid(project_id=2) >>> # Different server, same credentials >>> con3 = pymaid.connect_catmaid(server=”https://other.catmaid.server”)