Piccolo

Latest version: v1.5.0

Safety actively analyzes 627056 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 16 of 48

0.66.1

Not secure
------

In Piccolo you can print out any query to see the SQL which will be generated:

.. code-block:: python

>>> print(Band.select())
SELECT "band"."id", "band"."name", "band"."manager", "band"."popularity" FROM band

It didn't represent ``UUID`` and ``datetime`` values correctly, which is now fixed (courtesy theelderbeever).
See `PR 405 <https://github.com/piccolo-orm/piccolo/pull/405>`_.

-------------------------------------------------------------------------------

0.66.0

Not secure
------

Using descriptors to improve MyPy support (`PR 399 <https://github.com/piccolo-orm/piccolo/pull/399>`_).

MyPy is now able to correctly infer the type in lots of different scenarios:

.. code-block:: python

class Band(Table):
name = Varchar()

MyPy knows this is a Varchar
Band.name

band = Band()
band.name = "Pythonistas" MyPy knows we can assign strings when it's a class instance
band.name MyPy knows we will get a string back

band.name = 1 MyPy knows this is an error, as we should only be allowed to assign strings

-------------------------------------------------------------------------------

0.65.1

Not secure
------

Fixed bug with ``BaseUser`` and Piccolo API.

-------------------------------------------------------------------------------

0.65.0

Not secure
------

The ``BaseUser`` table hashes passwords before storing them in the database.

When we create a fixture from the ``BaseUser`` table (using ``piccolo fixtures dump``),
it looks something like:

.. code-block:: json

{
"id": 11,
"username": "bob",
"password": "pbkdf2_sha256$10000$abc123",
}

When we load the fixture (using ``piccolo fixtures load``) we need to be
careful in case ``BaseUser`` tries to hash the password again (it would then be a hash of
a hash, and hence incorrect). We now have additional checks in place to prevent
this.

Thanks to mrbazzan for implementing this, and sinisaos for help reviewing.

-------------------------------------------------------------------------------

0.64.0

Not secure
------

Added initial support for ``ForeignKey`` columns referencing non-primary key
columns. For example:

.. code-block:: python

class Manager(Table):
name = Varchar()
email = Varchar(unique=True)

class Band(Table):
manager = ForeignKey(Manager, target_column=Manager.email)

Thanks to theelderbeever for suggesting this feature, and with help testing.

-------------------------------------------------------------------------------

0.63.1

Not secure
------

Fixed an issue with the ``value_type`` of ``ForeignKey`` columns when
referencing a table with a custom primary key column (such as a ``UUID``).

-------------------------------------------------------------------------------

Page 16 of 48

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.