Openmetadata

Latest version: v0.5.6

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

Scan your dependencies

6.0

Here, history would not be maintained between the two different types (int, and float).

Now it does, it preserves the type too so that you get back both value and type when restoring from history.

`dump()` is `flush()`

This is to separate the Entry.dump() from om.flush(), flush performs an I/O operation whereas Entry.dump() serialises data internal to itself. This also conforms to the HDF5 standard.

0.5.3

entry()

Given a location and a metapath, return a fully-qualified Entry object or throw an error that it doesn't exist.

Industry strength

Tests now cover >80% of the codebase

Parent isn't a generator

Before, parent was returning a generator so as to facilitate for multiple parents - such as when a directory has multiple junctions. This was considered overengineering and caused superflous code throughout the library and has been distilled down to returning a single parent.

Path.set()

Path is now mutable and may be replaced/updated via a call to set(). See docstring for examples.

Suffix hints

When reading entry.text, the contents is natively unicode. Assigning the content of entry.text to an Entry object would implicitly alter its type to .string, since .string is associated with unicode.

Now, type-conversion have a hint property which may use an existing extension as hint on how to cast.

E.g. `"my string"` -> entry.text will preserve the .text suffix, whereas `True` -> entry.text will cast entry to `bool`

split() now returns suffixes

Before, split returned a pure metapath without suffixes, it is now the users responsibility to strip suffixes from split if so is required.

Suffix-independend find()

Find is supposed to "find" an entry within a directory, regardless of its suffix, and return the existing one (if one exists):

python
>>> om.find('/home/marcus', 'myentry')
'myentry.bool'


However, when a specific suffix is included, it is respected.

python
>>> om.find('/home/marcus', 'myentry.int')
None


No more name-conflicts

Prior to 0.5.3, an entry could get written under multiple suffixes:

python
om.write('/home/marcus', 'isawesome.string', 'True')
om.write('/home/marcus', 'isawesome.int', 'True')


This would produce two entries of `isawesome`, without incrementing history for the original when attempting to write to the new.

bash
$ ls
isawesome.string
isawesome.int


Names of entries MUST remain unique and so now, in 0.5.3, this is true.

python
First entry is written.
om.write('/home/marcus', 'isawesome.string', 'True')

Before writing, history is maintained for original `isawesome.string`
in addition to the original being removed.
om.write('/home/marcus', 'isawesome.int', 'True')


bash
$ ls
isawesome.int


Case-insensitivity

Open Metadata now defaults to case-insensitivity; meaning that utilities such as..

python
>>> om.find('/home/marcus', 'MynAME')


..will return identical results as..

python
>>> om.find('/home/marcus', 'myname')

0.5.2

om.split(path=string) -- Break apart location from metapath
om.convert(path=string) -- Turn an absolute path into Entry object

0.5

An *Epic Eureka Moment (tm)* release

1. Unification of `Group` and `Dataset` into `Entry`
2. New `Path` object
3. Ineritance
4. Type-changes maintained in history
5. dump() is flush()

Unification into `Entry`

This has been an amazing discovery! No more is there a need to separate between what is a "folder" or what is a "file". A Entry may contain any data and if said data is more appropriately stored on a file-system as a folder, then a folder it will become. To the user, it makes little difference.

This is in relation to the common notion of "variables" in dynamic programming languages, such as Python:

python
`my_var` is of type <int> here
>>> my_var = 5

But now we're changing it to <list> with a <string> inside
>>> my_var = ['string']

To the end user, it makes little difference;
what matters is the reference 'my_var'.


So, the equivalent in Open Metadata syntax:

python
>>> location = om.Location('/home/marcus')
>>> my_var = om.Entry('my_var', parent=location)
>>> my_var.value = 5
>>> my_var.value = ['string']
>>> om.dump(my_var)
Produces a folder of type <list> with a file of type <string>


New `Path` object

Fetching the path from any node now gives you an object with proper OS facilities; e.g. Windows and Posix system methods.

Ineritance

This is another amazing discovery. You can use it as an alternative to om.pull, it will behave just as such, only it will also pull from parents and parents parents; in effect "inheriting" from above hierarchy.

Type-changes maintained in history

Prior to 0.5, altering the type of a Dataset would break any prior history to said Dataset.

python
om.write(path, 'my_age', 5)

0.4

Mainly a maintenance release, but does contain backwards-incompatible changes; marked [INCOMPATIBLE] below.

Client-side serialisation

One of the major changes made was the transiton from ad-hoc serialisation to disk into JSON; making data readable from other programming languages without additional serialisation, one could simply use JSON.

The serialisation and de-serialisation processes are happening on the client-end, so as to further support interchangeable languages in communication between api and service, as well as to spare whatever central server exposing the service from needless serialisation; each client now serialises prior to communicating with the service.

Simplified lib.py

Node now allows for children; descendants of Blob merely have their children de-activated.

Modifications

* om.pull(node, lazy=False, depth=1)
* depth -- (new) how deep in the hierarchy to pull
* lazy -- whether or not to pull if node already has data

* om.read(path, metapath, native=True) [INCOMPATIBLE]
* metapath -- now in metapath-syntax, '/meta/path'
* native -- Return Python object if True, OM object if False

* om.write(path, metapath, data) [INCOMPATIBLE]
* metapath -- now in metapath-syntax, '/meta/path'

* Node
* path -- Now returns a Path object
* basename -- Now in Node.path.basename
* name -- Now in Node.path.name
* clear() -- Remove existing data

* om.metadata -- Replaced by om.read(native=False)

Additions

* om.ls -- List contents of node
* lib.Path -- Platform agnostic path-manipultaion object
* Node.__getitem__ -- Children may now be accessed via dict syntax
* Node.haschildren -- Returns whether or not `node` has children

Removals

* lib.TreeNode -- Was removed due to unifications of children in all Node objects

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.