{"id":20065447,"url":"https://github.com/nens/threedi-connector","last_synced_at":"2025-06-14T14:07:20.873Z","repository":{"id":144989468,"uuid":"121539520","full_name":"nens/threedi-connector","owner":"nens","description":"3Di API client","archived":false,"fork":false,"pushed_at":"2018-05-05T21:04:20.000Z","size":58,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-02T10:43:26.000Z","etag":null,"topics":["3di","api","client","simulation","water-management"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nens.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-02-14T17:26:45.000Z","updated_at":"2018-05-05T21:04:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"66e2bc93-f877-4f35-a2eb-c77adadc0d55","html_url":"https://github.com/nens/threedi-connector","commit_stats":{"total_commits":73,"total_committers":2,"mean_commits":36.5,"dds":"0.34246575342465757","last_synced_commit":"3b5643436ab61e9538f13a546d097edc5f0d58b1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nens/threedi-connector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nens%2Fthreedi-connector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nens%2Fthreedi-connector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nens%2Fthreedi-connector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nens%2Fthreedi-connector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nens","download_url":"https://codeload.github.com/nens/threedi-connector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nens%2Fthreedi-connector/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259827664,"owners_count":22917713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3di","api","client","simulation","water-management"],"created_at":"2024-11-13T13:50:37.955Z","updated_at":"2025-06-14T14:07:20.847Z","avatar_url":"https://github.com/nens.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"threedi-connector\n=================\n\nPython client library for interacting with the 3Di API.\n\nInstall\n-------\n\n.. code-block:: bash\n\n    $ pip install git+https://github.com/nens/threedi-connector.git\n\nUse\n---\n\nImport the ``threedi_connector`` module:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e import threedi_connector\n\nStart a simulation:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e simulation = threedi_connector.start_simulation(\n    ...    model_slug='v2_bergermeer-v2_bergermeer_bres_maalstop-55-784c561ecebf9433cd7beb8b6a22a14f2841cda4',\n    ...    organisation_uuid='61f5a464c35044c19bc7d4b42d7f58cb',\n    ...    scenario_name='test-lib (this result can be deleted)',\n    ...    start='2016-10-18T00:00',\n    ...    end='2016-10-18T00:30')\n    Username: \u003cyour username\u003e\n    Password: \u003cyour pw\u003e\n\nGet simulation task metadata using the returned ``Simulation`` object:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e simulation.info\n    {u'organisation_id': u'61f5a464c35044c19bc7d4b42d7f58cb',\n     u'result_id': u'300f9ed8d1d54ff8b4def220a81060c8',\n     u'status': u'received',\n     u'subgrid_id': u'headless:1e0a2077d55044399a857c766e328645'}\n\nInformation from 3Di API can be requested using the ``Client``.\nFor example, getting the saved states and queued simulation:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e client = threedi_connector.Client()\n    \u003e\u003e\u003e client.authenticate()  # authenticate once for this session\n    Username: \u003cyour username\u003e\n    Password: \u003cyour pw\u003e\n    \u003e\u003e\u003e client.saved_states\n    [{'some': 'data', ...}, ...]\n    \u003e\u003e\u003e sm.queued_tasks\n    [{'more': 'data', ...}, ...]\n\nInteractive mode\n^^^^^^^^^^^^^^^^\n\nInteractive mode is on by default. You can disable interactive prompts by\nauthenticating using the ``.authenticate(username, password)`` method on\n``Client`` or ``Simulation`` objects. Note: if you call\n``.authenticate()`` without arguments, it will prompt for credentials.\n\nTo disable interactivity completely it is safer to just instantiate with\n``interactive=False``:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e client = threedi_connector.Client(interactive=False)\n    \u003e\u003e\u003e simulation = threedi_connector.Simulation(interactive=False)\n\n\nRunning tests\n-------------\n\n.. code-block:: bash\n\n    $ python setup.py test\n\n\nDesign philosophy\n-----------------\n\nBe good at doing **one** (or maybe two or three) thing(s).\n\nA **very simple** API, with clear public and private classes/methods/functions. A simple API means also less need for thorough documentation.\n\nAs **few** dependencies as possible for maximum portability (ideally: **0**; the current situation).\n\nDesigned for both Jupyter notebook use (therefore i.e. interactive authentication), and use as a library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnens%2Fthreedi-connector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnens%2Fthreedi-connector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnens%2Fthreedi-connector/lists"}