Refactor imports to PascalCase aliases and update docs by fkarg · Pull Request #145 · pgvector/pgvector-python

@fkarg

Make available types and imports consistent with those (in PascalCase) available for other database libraries.

Closes pgvector#142 SQLModel SQLAlchemy ArgumentError when using HalfVector instead of Vector

@fkarg

@fkarg

@fkarg fkarg mentioned this pull request

Aug 27, 2025

@ankane

Hi @fkarg, the SQLAlchemy convention is to use uppercase for non-generic types. When Vector was initially added, it didn't follow this convention, and since most projects use it, I don't plan to change it right now.

The HalfVector and SparseVector exports will likely be removed in a future release (as the comment in the code indicates) to help reduce confusion, but it's a breaking change.

You're welcome to fork and make any changes you'd like, but please stopping submitting PRs for this (it isn't contributing positively to the project).

@fkarg

I didn't know about this, sorry for the confusion. I was hoping to increase consistency and help others unintentionally importing non-sqlalchemy types here, but yeah I understand that that would actually be a breaking change (though I doubt with many practical users).

Don't worry, I wanted to help out, but clearly my attempts here were misguided. If I do end up submitting another PR it'll be about something else entirely, but no promises ;)