{"id":24125,"library":"nucliadb-protos","title":"nucliadb Protos","description":"Official protobuf definitions for NucliaDB, the AI-powered search engine. Version 6.13.0.post6185. High release cadence (weekly+).","status":"active","version":"6.13.0.post6185","language":"python","source_language":"en","source_url":"https://github.com/nuclia/nucliadb","tags":["protobuf","nucliadb","grpc","definitions"],"install":[{"cmd":"pip install nucliadb-protos","lang":"bash","label":"install"},{"cmd":"pip install nucliadb-protos==6.13.0.post6185","lang":"bash","label":"install specific version"}],"dependencies":[{"reason":"Required for gRPC service generation","package":"grpcio","optional":false},{"reason":"Required for Protobuf message definitions","package":"protobuf","optional":false}],"imports":[{"note":"Package is nucliadb_protos (underscore), not nucliadb.protos","wrong":"from nucliadb.protos.resources import Resource","symbol":"Resource","correct":"from nucliadb_protos.resources_pb2 import Resource"},{"note":"Class name is KnowledgeBox, not KB","wrong":"from nucliadb_protos.knowledgebox_pb2 import KB","symbol":"KnowledgeBox","correct":"from nucliadb_protos.knowledgebox_pb2 import KnowledgeBox"},{"note":"","wrong":"","symbol":"TrainSet","correct":"from nucliadb_protos.train_pb2 import TrainSet"}],"quickstart":{"code":"from nucliadb_protos.resources_pb2 import Resource\n\n# Create a basic Resource message\nresource = Resource()\nresource.slug = \"my-doc\"\nresource.title = \"Hello, NucliaDB!\"\n\n# Access fields\nprint(resource.slug, resource.title)","lang":"python","description":"Import and use a protobuf message from nucliadb-protos."},"warnings":[{"fix":"Review release notes for field renames or removals; regenerate dependent code.","message":"Version 6.13.x may have introduced breaking changes to some message fields. Check CHANGELOG before upgrading from 6.x or earlier.","severity":"breaking","affected_versions":">=6.13.0"},{"fix":"Use .CopyFrom() or field-specific setters for complex sub-messages.","message":"Protobuf messages are immutable after mutation? No, but repeated fields require assignment of list or append(). Direct assignment like resource.fields = {...} on a map field may fail.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace deprecated enum values with the new ones (see changelog).","message":"Some old enum values (e.g., in WriterOp) have been deprecated. Use new enum names from v6.11+.","severity":"deprecated","affected_versions":">=6.11.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use correct package: pip install nucliadb-protos, then import nucliadb_protos.*","cause":"Trying to import from nucliadb instead of nucliadb_protos.","error":"ModuleNotFoundError: No module named 'nucliadb'"},{"fix":"Use: from nucliadb_protos.resources_pb2 import Resource","cause":"Importing the package directly instead of submodule.","error":"AttributeError: module 'nucliadb_protos' has no attribute 'resources_pb2'"},{"fix":"Ensure you are using the exact same protobuf class for CopyFrom/MergeFrom.","cause":"Trying to copy between incompatible protobuf message types.","error":"TypeError: Parameter to MergeFrom() must be instance of same class"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}