Skip to main content

Type stubs for Blender 5.0 Python API

Project description

blender-python-stubs

PyPI

Strict type stubs for Blender 5.0 Python API.

Provides autocomplete, type checking, and inline documentation for bpy, mathutils, bmesh, gpu, freestyle, and all other Blender Python modules. Generated stubs pass basedpyright all mode with 0 errors and use zero typing.Any.

Installation

pip install "blender-python-stubs>=5.0,<5.1"

Features

  • Full Blender API coverage (bpy, mathutils, bmesh, gpu, gpu_extras, bpy_extras, freestyle, aud, blf, bl_math, imbuf, idprop)
  • Accurate collection types (BlendDataObjects instead of generic bpy_prop_collection)
  • Readonly @property decorators for RNA attributes
  • Typed context members (bpy.context.active_object, selected_objects, etc.)
  • Constructor signatures for mathutils, gpu, and other C extension types
  • Literal enum types instead of plain str
  • Zero typing.Any usage
  • 0 errors in basedpyright strict mode

Usage

import bpy

obj = bpy.context.active_object
assert obj is not None
obj.location.x = 1.0

bpy.data.objects.new("Cube", bpy.data.meshes.new("Mesh"))

Disclaimer

This project was coded with assistance of AI.

License

MIT


Generated by blender-python-stubs.

Made with ❤️ at Autour de Minuit (ADV) blender

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blender_python_stubs-5.0.1.3.tar.gz (510.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blender_python_stubs-5.0.1.3-py3-none-any.whl (539.7 kB view details)

Uploaded Python 3

File details

Details for the file blender_python_stubs-5.0.1.3.tar.gz.

File metadata

File hashes

Hashes for blender_python_stubs-5.0.1.3.tar.gz
Algorithm Hash digest
SHA256 1f2e05267da16dc5f4bc8ff9e8a6a08f6037d10ee2c043f9776c6b76d64987d1
MD5 a36db15579eab637b5090cacbda429fb
BLAKE2b-256 99320ef24a3911932e90e051b0e47ac89b13b3de579d5630dd2c191bc2cc1470

See more details on using hashes here.

File details

Details for the file blender_python_stubs-5.0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for blender_python_stubs-5.0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 54ced322c6c7be9f45276970786a9ccf2ade7544ffb6f44b08db7da050bc5c84
MD5 febb248fa2d0a99e37c7655adc6b333c
BLAKE2b-256 aebf59f30fea09c4e0e69199d19ee56c0002560311edd92d6096498f7c8e4f37

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page