{"id":31821468,"url":"https://github.com/sisoe24/nuke-python-stubs","last_synced_at":"2025-10-11T13:48:08.921Z","repository":{"id":128643984,"uuid":"413527563","full_name":"sisoe24/nuke-python-stubs","owner":"sisoe24","description":"Nuke python file stubs to aid auto complete in text editors.","archived":false,"fork":false,"pushed_at":"2024-02-22T14:55:35.000Z","size":3753,"stargazers_count":13,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-02-22T15:53:53.124Z","etag":null,"topics":["foundry-nuke","hiero","nuke","nuke-stubs","python3","stubs"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sisoe24.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-10-04T17:49:44.000Z","updated_at":"2024-02-18T21:30:06.000Z","dependencies_parsed_at":"2024-02-22T15:48:44.309Z","dependency_job_id":null,"html_url":"https://github.com/sisoe24/nuke-python-stubs","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/sisoe24/nuke-python-stubs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sisoe24%2Fnuke-python-stubs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sisoe24%2Fnuke-python-stubs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sisoe24%2Fnuke-python-stubs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sisoe24%2Fnuke-python-stubs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sisoe24","download_url":"https://codeload.github.com/sisoe24/nuke-python-stubs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sisoe24%2Fnuke-python-stubs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007351,"owners_count":26084282,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["foundry-nuke","hiero","nuke","nuke-stubs","python3","stubs"],"created_at":"2025-10-11T13:48:03.853Z","updated_at":"2025-10-11T13:48:08.912Z","avatar_url":"https://github.com/sisoe24.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 1. Nuke python stubs file\n\nA quick and dirty script to create Nuke Python file stubs to support auto-complete in text editors.\n\n- [1. Nuke python stubs file](#1-nuke-python-stubs-file)\n  - [1.1. Description](#11-description)\n  - [1.2. Usage](#12-usage)\n    - [1.2.1. Generate the stubs](#121-generate-the-stubs)\n    - [1.2.2. Use the stubs](#122-use-the-stubs)\n  - [1.3. Type guess](#13-type-guess)\n  - [1.4. Contributing](#14-contributing)\n  - [1.5. Acknowledgment](#15-acknowledgment)\n  - [1.6 TODO](#16-todo)\n  - [1.6. Screenshot](#16-screenshot)\n\n## 1.1. Description\n\nA stub file generator for Nuke \u0026 Hiero Python 3. Besides including the public API, the script will generate stubs for:\n\n- Classes.\n- Built-in methods.\n- Constant.\n- Arguments types.\n- Return statements.\n\n## 1.2. Usage\n\n### 1.2.1. Generate the stubs\n\nYou can use the stub files inside the [repository](https://github.com/sisoe24/nuke-python-stubs/releases), but if you want to generate them, copy the `nukestubsgen.py` file inside the Nuke Script Editor and run it.\n\n\u003e When generating the stubs, it is preferable to use Nuke Studio, as doing it inside Nuke will cause the Hiero stubs to be incomplete.\n\nOnce done, you can find the stubs inside `~/.nuke/nuke-python-stubs/stubs`.\n\n### 1.2.2. Use the stubs\n\nUsing the stubs will vary based on your text editor since most of them have their way of adding stubs to the environment.\n\nAlternatively, you can use Visual Studio Code [NukeTools](https://marketplace.visualstudio.com/items?itemName=virgilsisoe.nuke-tools) and call the `Nuke Tools: Add Python Stubs` command.\n\n## 1.3. Type guess\n\nThe script tries to guess the data type by parsing the function signature/documentation. This method is not 100% precise, and some types are unknown or wrong.\n\n- The type `Any` means it could be any we don't know and not any type is valid.\n- The type  `int|float` means it could be a float or an int we don't know and not any number type is valid.\n- No types means that is not possible to guess the type.\n\nThe wrong types are likely due to the parser identifying valid keywords inside the documentation, which uses them to make a guess.\n\nExample:\n\nIn the return value from the docs: `-\u003e switch to next view in settings Views list`, the parser will guess the type as `list` since it found the word `list` in the documentation and not because it knows the type.\n\n\u003e You can also disable the guess filter by setting `StubsRuntimeSettings.guess` to `False`.\n\nAs a workaround, there is a post-fix mechanism which allows you to \"manually\" point to the wrong value and substitute it with a new one. You can look at the `NUKE_POST_FIXES` dictionary for more information.\n\n## 1.4. Contributing\n\nIn order to make the stubs as accurate as possible, feel free to open a new issue if you find any wrong values or missing information. Also, you can contribute by adding post-fixes information to the `*_POST_FIXES` dictionary.\n\nTODO: Add a section on how to contribute to the project.\n\n## 1.5. Acknowledgment\n\nPycharm Stub generator inspired the creation of this script.\n\n## 1.6 TODO\n\n- [ ] Make pre-commit on a pull request.\n- [ ] Make it available via pip.\n- [ ] Find duplicates\n\n## 1.6. Screenshot\n\n[Nuke Tools](https://marketplace.visualstudio.com/items?itemName=virgilsisoe.nuke-tools) for Visual Studio Code will include the stubs files by default.\n\n![Alt text](images/auto_complete.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsisoe24%2Fnuke-python-stubs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsisoe24%2Fnuke-python-stubs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsisoe24%2Fnuke-python-stubs/lists"}