PythonCall

Python and Julia in harmony.

https://github.com/juliapy/pythoncall.jl

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    2 of 34 committers (5.9%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.6%) to scientific vocabulary

Keywords

ffi interoperability julia python

Keywords from Contributors

graphics flux automatic-differentiation pdes sciml unconstrained-optimization unconstrained-optimisation optimisation the-human-brain optim
Last synced: 6 months ago · JSON representation ·

Repository

Python and Julia in harmony.

Basic Info
Statistics
  • Stars: 962
  • Watchers: 5
  • Forks: 75
  • Open Issues: 187
  • Releases: 42
Topics
ffi interoperability julia python
Created over 5 years ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

README.md

PythonCall.jl logo
PythonCall & JuliaCall

Project Status: Active – The project has reached a stable, usable state and is being actively developed. Stable Documentation Dev Documentation Tests Codecov PkgEval

Bringing Python® and Julia 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.9 upwards and Python 3.9 upwards.

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

To get started, read the documentation.

Example 1: Calling Python from Julia

In this example, we use the Julia module PythonCall from a Pluto notebook to inspect the Iris dataset: - We load the Iris dataset as a Julia DataFrame using RDatasets. - We use pytable(df) to convert it to a Python Pandas DataFrame. - We use the Python package Seaborn to produce a pair-plot, which is automatically displayed.

Seaborn example screenshot

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

What about PyCall?

The existing package PyCall 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. This means each Julia project can have an isolated set of Python dependencies.

Owner

  • Name: JuliaPy
  • Login: JuliaPy
  • Kind: organization

Software that connects the Julia and Python languages.

Citation (CITATION.bib)

@misc{PythonCall.jl,
  author = {Rowley, Christopher},
  title = {PythonCall.jl: Python and Julia in harmony},
  year  = {2022},
  url   = {https://github.com/JuliaPy/PythonCall.jl},
}

Committers

Last synced: 11 months ago

All Time
  • Total Commits: 997
  • Total Committers: 34
  • Avg Commits per committer: 29.324
  • Development Distribution Score (DDS): 0.088
Past Year
  • Commits: 35
  • Committers: 10
  • Avg Commits per committer: 3.5
  • Development Distribution Score (DDS): 0.543
Top Committers
Name Email Commits
Christopher Doris g****s 909
Christopher Rowley c****s@g****m 30
github-actions[bot] 4****] 9
Miles Cranmer m****r@g****m 7
Lilith Orion Hafner l****r@g****m 4
Pietro Monticone 3****e 3
Páll Haraldsson P****n@g****m 3
Cristóvão Duarte Sousa c****s@g****m 2
Daniel Pinyol d****l@g****m 2
Helge Eichhorn g****t@h****e 2
Lasse Peters l****s@m****g 2
Steven G. Johnson s****j@m****u 2
Daniel Ingraham d****m@g****m 1
Alexander Seiler s****x@g****m 1
Brian Dellabetta b****a 1
Camilo De La Torre 6****t 1
Carlo Lucibello c****o@g****m 1
Eric Hanson 5****n 1
ExpandingMan E****n 1
Glenn Moynihan g****y@g****m 1
Guillaume Dalle 2****e 1
Guillem Ramírez Miranda 1****9@g****m 1
Gustavo Goretkin g****n@g****m 1
Hantao Cui c****o 1
Marius Millea m****a@g****m 1
Pablo Zubieta 8****z 1
Pedro Maciel Xavier 3****r 1
Sam Kaplan s****n@c****m 1
Shuhua Gao s****o@u****u 1
Stephan Sahm S****m@g****e 1
and 4 more...
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 241
  • Total pull requests: 111
  • Average time to close issues: 3 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 113
  • Total pull request authors: 32
  • Average comments per issue: 3.14
  • Average comments per pull request: 1.86
  • Merged pull requests: 66
  • Bot issues: 0
  • Bot pull requests: 13
Past Year
  • Issues: 63
  • Pull requests: 55
  • Average time to close issues: 18 days
  • Average time to close pull requests: 19 days
  • Issue authors: 45
  • Pull request authors: 12
  • Average comments per issue: 1.92
  • Average comments per pull request: 0.78
  • Merged pull requests: 30
  • Bot issues: 0
  • Bot pull requests: 13
Top Authors
Issue Authors
  • cjdoris (31)
  • MilesCranmer (24)
  • LilithHafner (14)
  • PallHaraldsson (13)
  • schlichtanders (9)
  • dpinol (5)
  • Moelf (5)
  • ma-sadeghi (4)
  • lassepe (4)
  • hhaensel (3)
  • hubert-associates (3)
  • stevengj (3)
  • martinmestre (3)
  • mtsokol (3)
  • ejmeitz (2)
Pull Request Authors
  • cjdoris (44)
  • MilesCranmer (19)
  • dependabot[bot] (13)
  • hhaensel (8)
  • ericphanson (4)
  • LilithHafner (4)
  • dpinol (3)
  • lassepe (3)
  • amilsted (3)
  • schlichtanders (2)
  • gdalle (2)
  • xgdgsc (2)
  • pedromxavier (2)
  • hyrodium (2)
  • cdsousa (2)
Top Labels
Issue Labels
bug (109) enhancement (47) question (29) priority (4) stale (3) help wanted (3) good first issue (1) documentation (1)
Pull Request Labels
dependencies (13) github_actions (13) documentation (6) stale (1) priority (1)

Packages

  • Total packages: 1
  • Total downloads:
    • julia 7,199 total
  • Total dependent packages: 69
  • Total dependent repositories: 0
  • Total versions: 42
juliahub.com: PythonCall

Python and Julia in harmony.

  • Versions: 42
  • Dependent Packages: 69
  • Dependent Repositories: 0
  • Downloads: 7,199 Total
Rankings
Stargazers count: 1.2%
Dependent packages count: 2.3%
Forks count: 4.3%
Average: 4.5%
Dependent repos count: 9.9%
Last synced: 6 months ago

Dependencies

.github/workflows/CompatHelper.yml actions
  • julia-actions/setup-julia v1 composite
.github/workflows/docs.yml actions
  • actions/checkout v2 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/register-pypi.yml actions
  • actions/checkout master composite
  • actions/setup-python v3 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/register.yml actions
  • julia-actions/RegisterAction latest composite
.github/workflows/tagbot.yml actions
  • JuliaRegistries/TagBot v1 composite
.github/workflows/tests-nightly.yml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • codecov/codecov-action v1 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/tests.yml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • codecov/codecov-action v2 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v1 composite
pyproject.toml pypi
.github/workflows/docscleanup.yml actions
  • actions/checkout v2 composite