KX Community

Find answers, ask questions, and connect with our KX Community around the world.

Home Forums PyKX PyKX 2.3.0 Released

  • PyKX 2.3.0 Released

    Posted by cmccarthy1 on January 22, 2024 at 12:00 am

    Hi All,

    PyKX 2.3.0 has been released  Full details of the release can be found here.

    Additions

    • PyKX now supports the use of KDB_LICENSE_B64 or KDB_K4LICENSE_B64 configuration values/environment variables to define the content of a kc.lic or k4.lic license respectively if no license is found on initial usage of PyKX.
    • Shortcut provided for access to current date, time and timestamp information using 'today' and 'now'.

      >>> kx.DateAtom(‘today’) pykx.DateAtom(pykx.q(‘2024.01.05’)) >>> kx.TimeAtom(‘now’) pykx.TimeAtom(pykx.q(’16:15:32.724′)) >>> kx.TimestampAtom(‘now’) pykx.TimestampAtom(pykx.q(‘2024.01.05T16:15:42.926631000’))
       

    • Addition of support for inplace updates of PyKX tables modified using qsql select/update/delete operations on in-memory data. Application of inplace modifications is not supported for direct application on Partitioned/Splayed tables.

      >>> N = 1000 >>> qtab = kx.Table(data={‘x’: kx.random.random(N, 1.0, seed=10)}) >>> qtab pykx.Table(pykx.q(‘ x ———– 0.0891041 0.8345194 0.3621949 0.999934 0.3837986 .. ‘)) >>> kx.q.qsql.select(qtab, where = [‘x>0.5’], inplace=True) pykx.Table(pykx.q(‘ x ———– 0.8345194 0.999934 0.8619188 0.7517286 0.6348263 .. ‘)) >>> qtab pykx.Table(pykx.q(‘ x ———– 0.8345194 0.999934 0.8619188 0.7517286 0.6348263 .. ‘))
       

    • Addition of reset_index, add_suffix, add_prefix, count, skew and std functionality to Pandas Like API

      • See here for details of supported keyword arguments, limitations and examples.
    • %%q Jupyter Notebook magic adds --debug option which prints the q backtrace if the cell execution fails.
    • Release 2.3.0 adds to PyKX the concept of Beta features, these features are available to users through setting the configuration/environment variable PYKX_BETA_FEATURES. For more information on Beta features see further documentation here

    Fixes and Improvements

    • %%q Jupyter Notebook magic now returns all outputs up to and including an error when thrown. Previously only the error was returned.
    • %%q Jupyter Notebook magic ignores accidental whitespace in execution options. Below example no longer fails with Received unknown argument error:

      %%q –port 5000
       

    • In cases where PyKX IPC sockets read data from unexpected publishers it could raise an IndexError. PyKX will now provide a more verbose error indicating that an unexpected message has been received, the bytes processed and requests a reproducible example to be provided if possible.

    • Update to table column retrieval logic to error when a user attempts to access a non-existent column with a queried table.

      >>> tab = kx.Table(data = {‘a’: [1, 2, 3]}) >>> tab[‘c’] .. QError: Attempted to retrieve inaccessible column: c

    • Improved error message for conversion failures.

    • Fixes an issue where a user would receive a length error when attempting to apply min, max, prod and sum functions on pykx.KeyedTable objects.

    Beta Features

    • Database Management functionality has been added for the creation, loading and maintenance of PyKX Partitioned Databases. A full worked example of this functionality can be found here along with full API documentation which includes examples of each function here. The API includes but is not limited to the following:

      • Database table creation and renaming.
        • Enumeration of in-memory tables against on-disk sym file.
      • Column listing, addition, reordering, renaming copying, function application and deletion on-disk.
      • Attribute setting and removal.
      • Addition of missing tables from partitions within a database.
    • Added PYKX_THREADING environment variable that allows multithreaded programs to modify state when calling into python on secondary threads. Note: This behaviour is only supported on Linux / MacOS.

    cmccarthy1 replied 2 months, 1 week ago 2 Members · 1 Reply
  • 1 Reply

Sorry, there were no replies found.

Log in to reply.