juliacall


Namejuliacall JSON
Version 0.9.23 PyPI version JSON
download
home_pagehttp://github.com/JuliaPy/PythonCall.jl
SummaryJulia and Python in seamless harmony
upload_time2024-08-22 20:09:42
maintainerNone
docs_urlNone
authorNone
requires_python~=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1><img src="docs/src/assets/logo.png" alt="PythonCall.jl logo" style="width: 100px;"><br>PythonCall &amp;&nbsp;JuliaCall</h1>

[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![Stable Documentation](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliapy.github.io/PythonCall.jl/stable)
[![Dev Documentation](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliapy.github.io/PythonCall.jl/dev)
[![Tests](https://github.com/JuliaPy/PythonCall.jl/actions/workflows/tests.yml/badge.svg)](https://github.com/JuliaPy/PythonCall.jl/actions/workflows/tests.yml)
[![Codecov](https://codecov.io/gh/JuliaPy/PythonCall.jl/branch/main/graph/badge.svg?token=A813UUIHGS)](https://codecov.io/gh/JuliaPy/PythonCall.jl)
[![PkgEval](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/P/PythonCall.svg)](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/P/PythonCall.html)

Bringing [**Python®**](https://www.python.org/) and [**Julia**](https://julialang.org/) together in seamless harmony:
- Call Python code from Julia and Julia code from Python via a symmetric interface.
- Simple syntax, so the Python code looks like Python and the Julia code looks like Julia.
- Intuitive and flexible conversions between Julia and Python: anything can be converted, you are in control.
- Fast non-copying conversion of numeric arrays in either direction: modify Python arrays (e.g. `bytes`, `array.array`, `numpy.ndarray`) from Julia or Julia arrays from Python.
- Helpful wrappers: interpret Python sequences, dictionaries, arrays, dataframes and IO streams as their Julia counterparts, and vice versa.
- Beautiful stack-traces.
- Supports modern systems: tested on Windows, MacOS and Linux, 64-bit, Julia 1.6.1 upwards and Python 3.8 upwards.

⭐ If you like this, a GitHub star would be lovely thank you. ⭐

To get started, read the [documentation](https://juliapy.github.io/PythonCall.jl/stable).

## Example 1: Calling Python from Julia

In this example, we use the Julia module PythonCall from a [Pluto](https://github.com/fonsp/Pluto.jl) notebook to inspect the Iris dataset:
- We load the Iris dataset as a Julia [DataFrame](https://dataframes.juliadata.org/stable/) using [RDatasets](https://github.com/JuliaStats/RDatasets.jl).
- We use `pytable(df)` to convert it to a Python [Pandas DataFrame](https://pandas.pydata.org/).
- We use the Python package [Seaborn](https://seaborn.pydata.org/) to produce a pair-plot, which is automatically displayed.

![Seaborn example screenshot](https://raw.githubusercontent.com/JuliaPy/PythonCall.jl/main/examples/seaborn.png)

## Example 2: Calling Julia from Python

In this example we use the Python module JuliaCall from an IPython notebook to train a simple neural network:
- We generate some random training data using Python's Numpy.
- We construct and train a neural network model using Julia's Flux.
- We plot some sample output from the model using Python's MatPlotLib.

![Flux example screenshot](https://raw.githubusercontent.com/JuliaPy/PythonCall.jl/main/examples/flux.png)

## What about PyCall?

The existing package [PyCall](https://github.com/JuliaPy/PyCall.jl) is another similar interface to Python. Here we note some key differences:.
- PythonCall supports a wider range of conversions between Julia and Python, and the conversion mechanism is extensible.
- PythonCall by default never copies mutable objects when converting, but instead directly wraps the mutable object. This means that modifying the converted object modifies the original, and conversion is faster.
- PythonCall does not usually automatically convert results to Julia values, but leaves them as Python objects. This makes it easier to do Pythonic things with these objects (e.g. accessing methods) and is type-stable.
- PythonCall installs dependencies into a separate Conda environment for each Julia project using [CondaPkg](https://github.com/JuliaPy/CondaPkg.jl). This means each Julia project can have an isolated set of Python dependencies.

            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/JuliaPy/PythonCall.jl",
    "name": "juliacall",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "~=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/14/f6/c9f3f925d0a5c518aaea9ad2c5668764ef002082b8c7e035d09898b112a0/juliacall-0.9.23.tar.gz",
    "platform": null,
    "description": "<h1><img src=\"docs/src/assets/logo.png\" alt=\"PythonCall.jl logo\" style=\"width: 100px;\"><br>PythonCall &amp;&nbsp;JuliaCall</h1>\r\n\r\n[![Project Status: Active \u2013 The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\r\n[![Stable Documentation](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliapy.github.io/PythonCall.jl/stable)\r\n[![Dev Documentation](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliapy.github.io/PythonCall.jl/dev)\r\n[![Tests](https://github.com/JuliaPy/PythonCall.jl/actions/workflows/tests.yml/badge.svg)](https://github.com/JuliaPy/PythonCall.jl/actions/workflows/tests.yml)\r\n[![Codecov](https://codecov.io/gh/JuliaPy/PythonCall.jl/branch/main/graph/badge.svg?token=A813UUIHGS)](https://codecov.io/gh/JuliaPy/PythonCall.jl)\r\n[![PkgEval](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/P/PythonCall.svg)](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/P/PythonCall.html)\r\n\r\nBringing [**Python\u00ae**](https://www.python.org/) and [**Julia**](https://julialang.org/) together in seamless harmony:\r\n- Call Python code from Julia and Julia code from Python via a symmetric interface.\r\n- Simple syntax, so the Python code looks like Python and the Julia code looks like Julia.\r\n- Intuitive and flexible conversions between Julia and Python: anything can be converted, you are in control.\r\n- Fast non-copying conversion of numeric arrays in either direction: modify Python arrays (e.g. `bytes`, `array.array`, `numpy.ndarray`) from Julia or Julia arrays from Python.\r\n- Helpful wrappers: interpret Python sequences, dictionaries, arrays, dataframes and IO streams as their Julia counterparts, and vice versa.\r\n- Beautiful stack-traces.\r\n- Supports modern systems: tested on Windows, MacOS and Linux, 64-bit, Julia 1.6.1 upwards and Python 3.8 upwards.\r\n\r\n\u2b50 If you like this, a GitHub star would be lovely thank you. \u2b50\r\n\r\nTo get started, read the [documentation](https://juliapy.github.io/PythonCall.jl/stable).\r\n\r\n## Example 1: Calling Python from Julia\r\n\r\nIn this example, we use the Julia module PythonCall from a [Pluto](https://github.com/fonsp/Pluto.jl) notebook to inspect the Iris dataset:\r\n- We load the Iris dataset as a Julia [DataFrame](https://dataframes.juliadata.org/stable/) using [RDatasets](https://github.com/JuliaStats/RDatasets.jl).\r\n- We use `pytable(df)` to convert it to a Python [Pandas DataFrame](https://pandas.pydata.org/).\r\n- We use the Python package [Seaborn](https://seaborn.pydata.org/) to produce a pair-plot, which is automatically displayed.\r\n\r\n![Seaborn example screenshot](https://raw.githubusercontent.com/JuliaPy/PythonCall.jl/main/examples/seaborn.png)\r\n\r\n## Example 2: Calling Julia from Python\r\n\r\nIn this example we use the Python module JuliaCall from an IPython notebook to train a simple neural network:\r\n- We generate some random training data using Python's Numpy.\r\n- We construct and train a neural network model using Julia's Flux.\r\n- We plot some sample output from the model using Python's MatPlotLib.\r\n\r\n![Flux example screenshot](https://raw.githubusercontent.com/JuliaPy/PythonCall.jl/main/examples/flux.png)\r\n\r\n## What about PyCall?\r\n\r\nThe existing package [PyCall](https://github.com/JuliaPy/PyCall.jl) is another similar interface to Python. Here we note some key differences:.\r\n- PythonCall supports a wider range of conversions between Julia and Python, and the conversion mechanism is extensible.\r\n- PythonCall by default never copies mutable objects when converting, but instead directly wraps the mutable object. This means that modifying the converted object modifies the original, and conversion is faster.\r\n- PythonCall does not usually automatically convert results to Julia values, but leaves them as Python objects. This makes it easier to do Pythonic things with these objects (e.g. accessing methods) and is type-stable.\r\n- PythonCall installs dependencies into a separate Conda environment for each Julia project using [CondaPkg](https://github.com/JuliaPy/CondaPkg.jl). This means each Julia project can have an isolated set of Python dependencies.\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Julia and Python in seamless harmony",
    "version": "0.9.23",
    "project_urls": {
        "Homepage": "http://github.com/JuliaPy/PythonCall.jl"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "94c377fd3da267a3d748e91a575f2c876cfeb680bebfc9181a1b6c1357921f0c",
                "md5": "dfbd4233b3dd4d1abbcb8daf46799a2b",
                "sha256": "67689bdeadf8438f4b302cbe88b31610ee8b345577b4df04328d67c4e66f5e62"
            },
            "downloads": -1,
            "filename": "juliacall-0.9.23-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dfbd4233b3dd4d1abbcb8daf46799a2b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.8",
            "size": 12186,
            "upload_time": "2024-08-22T20:09:41",
            "upload_time_iso_8601": "2024-08-22T20:09:41.547235Z",
            "url": "https://files.pythonhosted.org/packages/94/c3/77fd3da267a3d748e91a575f2c876cfeb680bebfc9181a1b6c1357921f0c/juliacall-0.9.23-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "14f6c9f3f925d0a5c518aaea9ad2c5668764ef002082b8c7e035d09898b112a0",
                "md5": "1adcf4a97e3955ab56c7368956a02eec",
                "sha256": "536f2e0f4ccfd34920322121b4353079029123eae81b7200ed1787e49d8053d2"
            },
            "downloads": -1,
            "filename": "juliacall-0.9.23.tar.gz",
            "has_sig": false,
            "md5_digest": "1adcf4a97e3955ab56c7368956a02eec",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.8",
            "size": 12739,
            "upload_time": "2024-08-22T20:09:42",
            "upload_time_iso_8601": "2024-08-22T20:09:42.897102Z",
            "url": "https://files.pythonhosted.org/packages/14/f6/c9f3f925d0a5c518aaea9ad2c5668764ef002082b8c7e035d09898b112a0/juliacall-0.9.23.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-22 20:09:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "JuliaPy",
    "github_project": "PythonCall.jl",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "juliacall"
}
        
Elapsed time: 0.51059s