# Devcontainer + vscode + uv + robotcode

**URL:** <https://forum.robotframework.org/t/devcontainer-vscode-uv-robotcode/8780>\
**Category:** Visual Studio Code(ium)\
**Created:** [14 April 2025 15:44 UTC](https://forum.robotframework.org/t/devcontainer-vscode-uv-robotcode/8780 "2025-04-14T15:44:17Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![daniel](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/daniel/32/1492_2.png) [@daniel](https://forum.robotframework.org/u/daniel)\
**Post date:** [15 April 2025 09:48 UTC](https://forum.robotframework.org/t/devcontainer-vscode-uv-robotcode/8780/8 "2025-04-15T09:48:40Z")

</div>

Some time ago I created a repo where I tried the same thing 😉

> **[GitHub - d-biehl/robot\_uv\_libtest](https://github.com/d-biehl/robot_uv_libtest)**
>
> Trage zur Entwicklung von d-biehl/robot\_uv\_libtest bei, indem du ein Konto bei GitHub erstellst.

The trick to setup a robot framework library with uv is the following:

Create your working folder and in that folder create a normal python library with uv, like this:

```python
mkdir robotframework-dosomething
cd robotframework-dosomething
uv init --name DoSomething --lib # notice here without robotframework-

```

then open the pyproject.toml and prepend `robotframework-` to the `name` setting, like this:

```python
name = "robotframework-dosomething"

```

Now the “complicated” part, that depends on you build-system that your pyproject.toml uses, but if you use uv’s default `hatchling` you should add a new section to your pyproject toml file, like this:

```python
[tool.hatch.build.targets.wheel]
packages = ["src/DoSomething"] # attention this is case sensitive!!!

```

this tells hatchling where it can find the sources for the project when it builds a wheel package, thats what happens if you install the project in editable mode.

You can now add `robotframework` as a dependency with

```python
uv add robotframework

```

and maybe add other dev dependencies like this:

```python
uv add --dev robotframework-tidy

```

and now remove the old `.venv` and create a new one with

```python
uv sync

```

now you can select the python environment in vscode and everything should run and also robot. There is no need to setup what ever python paths or so, because the project is installed per default in editable mode.

---

_[View the full topic](https://forum.robotframework.org/t/devcontainer-vscode-uv-robotcode/8780)._
