IPython Magic for Writing Simpler Bodo Code
Project description
Bodo IPython Magic
The Bodo IPython Magic is used to write simpler Python code with bodo
. For example, you can take the following code:
import bodo
import pandas as pd
@bodo.jit
def test():
return pd.read_parquet('sample.pq')
df = test()
and (using the %%bodo
magic) convert it to:
%%bodo
import pandas as pd
df = pd.read_parquet('sample.pq)
Why a Magic?
When presenting bodo
, we like to use very simple examples like loading a CSV file, performing some simple operations, and so on. However, these cases generally look longer and more compilected in comparison to competing solutions like pyspark
, dask
, ray
, and so on. This magic is intended to target these issues.
Arguments
%bodo [-v] [-c] [-d] [-o [OUTPUTS [OUTPUTS ...]]]
optional arguments:
-v, --verbose Print Verbose and Debugging Info
-c, --cache Enable Caching on the Wrapped Function
-d, --dry-run Do Not Execute Any Code or Wrapper Function
-o <[OUTPUTS [OUTPUTS ...]]>, --outputs <[OUTPUTS [OUTPUTS ...]]>
Variables to Output from the Wrapped Function (default: Returns All Defined Variables)
Supported Features
- Inserts
import bodo
automatically - Imports
- Automatically adds the
@bodo.jit
decorator to any function in the code cell
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bodo_magic-1.0.0.tar.gz
(10.1 kB
view hashes)
Built Distribution
Close
Hashes for bodo_magic-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a06dfb92485c47aaa8e84e4902f2f9ecb3292489cc5b3b4113614337fd24b90f |
|
MD5 | 917cbd590a0a45d2355d63da6cda3d96 |
|
BLAKE2b-256 | 317ea03b8cd27a88553c815f729fc7e430ca942c43d95711887928c512cbb75d |