Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
b3b committed Dec 20, 2020
1 parent 499b4b9 commit 9272e1d
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 4 deletions.
58 changes: 57 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
PythonHere
==========

https://img.shields.io/pypi/status/pythonhere

.. start-badges
.. image:: https://img.shields.io/docker/v/herethere/pythonhere?color=%23FFD43B&label=Docker%20Image
:target: https://pypi.python.org/pypi/pythonhere
:alt: Status
.. image:: https://img.shields.io/pypi/v/pythonhere.svg
:target: https://pypi.python.org/pypi/pythonhere
:alt: Latest version on PyPi
.. image:: https://img.shields.io/docker/v/herethere/pythonhere?color=%23FFD43B&label=Docker%20Image
:target: https://hub.docker.com/r/herethere/pythonhere
:alt: Docker Image Version (latest by date)
.. image:: https://img.shields.io/pypi/pyversions/pythonhere.svg
:target: https://pypi.python.org/pypi/pythonhere
:alt: Supported Python versions
Expand All @@ -16,4 +24,52 @@ PythonHere
:alt: Code coverage Status
.. end-badges
Here is the Kivy based app to run code from the Jupyter magic %there.
`Here` is the `Kivy <https://kivy.org>`_ based app to run Python code from the `Jupyter <https://jupyter.org/>`_ magic %there.

- `Here` is a server part with the GUI interface. It could be Android, Raspberry Pi, some other remote device that being debugged.
- And `%there` is a client - Jupyter magic command to run code interactively on remote device.


Install on Android
------------------

Ready-to-use `PythonHere` APKs are available in the `Releases <https://github.com/b3b/pythonhere/releases>`_ section.

For a list of installed Python packages, see: `buildozer.spec <./buildozer.spec>`_.


Quick Start with Docker
-----------------------

Docker image is based on `Jupyter Docker Stacks <https://jupyter-docker-stacks.readthedocs.io/en/latest/>`_, and includes installed `PythonHere` with usage examples.

Example command to start the Docker container::

docker run \
--rm \
-p 8888:8888 \
-v "$(pwd)/work":/home/jovyan/work \
herethere/pythonhere:latest


Command will expose the Jupyter Notebook server on host port 8888. Jupyter logs appear in the terminal and include an URL to the notebook server: http://127.0.0.1:8888/?token-... . Visiting this URL in a browser loads the Jupyter Notebook dashboard page.

Files from the directory **work** inside container, will be available in the host directory with the same name: **work**.


Run with Docker Compose
^^^^^^^^^^^^^^^^^^^^^^^

Commands to run with Docker Compose::

cp docker-compose.yml.tmpl docker-compose.yml
docker-compose up


Related resources
-----------------

* `Kivy Remote Shell <https://github.com/kivy/kivy-remote-shell>`_ : Remote SSH+Python interactive shell application
* `herethere <https://github.com/b3b/herethere>`_ : Library for interactive code execution, based on AsyncSSH
* `AsyncSSH <https://github.com/ronf/asyncssh>`_ : Asynchronous SSH for Python
* `Buildozer action <https://github.com/ArtemSBulgakov/buildozer-action>`_ : GitHub action that is used to build Android APK with `Buildozer <https://github.com/kivy/buildozer>`_
2 changes: 1 addition & 1 deletion docker-compose.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
image: herethere/pythonhere:latest
# build: .
ports:
- 8889:8888
- 8888:8888
# Uncomment and fill in environment, to override values from there.env config
# environment:
# - THERE_HOST=
Expand Down
4 changes: 2 additions & 2 deletions examples/Getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ from kivy import platform
print("Hello from", platform)
```

#### Use widgets
#### Use Kivy widgets

```python
%%there
Expand All @@ -40,7 +40,7 @@ from kivy.uix.label import Label
root.clear_widgets() # Remove all current childrens

# And add the new one
widget = Label(text="Kivy", font_size="80sp")
widget = Label(text="Kivy", font_size="50sp")
root.add_widget(widget)
```

Expand Down

0 comments on commit 9272e1d

Please sign in to comment.