Yay

Latest version: v3.1.1

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

Scan your dependencies

Page 4 of 12

0.0.49

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

- Added a string replacement function allowing people to do things like::

something: jolly good show
slug: ${replace(something, " ", "-")}

thereafter the value of ``slug`` will be ``jolly-good-show``.

0.0.48

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

- Support in operator during foreach::

result.foreach v in somevalues if v in somelist: ${v}.

0.0.47

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

- Allow expressions to contain literal strings and floats::

result: ${site.description else "No description"}
result2: ${3.212121}

- Allow expressions to return an empty list::

result: ${site.vhosts else []}

- Allow equality checks of undefined keys to pass or fail appropriately without
raising a NoMatching exception::

data:
part1:
a: 1
part2:
c: 2

res1.foreach p in data if data[p].a = 2: ${p}
res2.foreach p in data if data[p].c != 1: ${p}

res1 will be empty as neither part1 nor part2 have an a field with a value of
2, and res2 will contain part1 and part2 as neither have a c field wth a
value of 1.

- Add an ``undefined`` that raises a NoMatch exception when resolved. This
allows one to filter by whether or not a key is present in a mapping.

data:
part1:
a: 1
part2:
c: 2

res.foreach p in data if data[p].c = undefined: ${p}

res will contain part1 as part1 doesn't have a c field.

0.0.46

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

- Fix ``else`` expression inside an ``.include``

0.0.45

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

- You can now pass an etag to the open method of ``Openers``. This will throw a
NotModified exception if etag matching shows the request URI is unchanged.
This can be used to implement caching strategies and reduce the amount of data
that yay pulls over network connections::

>>> from yay.openers import Openers
>>> fp = Openers().open("/tmp/somefile, etag="1234535462356456fa")
NotModified: File '/tmp/somefile' not modified

- All openers will now have an etag property. This property can be None if a
suitable etag cannot be provided. Otherwise it should be some hash that
guarantees the state of the file so that later requests can just ask "has it
changed since it was in this state". To get an etag::

>>> from yay.openers import Openers
>>> fp = Openers().open("/tmp/somefile")
>>> print fp.etag
1234535462356456fa

0.0.44

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

- Fix .select when value that is resolved is a complicated expression.

- Better validation when you accidentally mix up list and mapping types.

Page 4 of 12

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.