oxlab


Nameoxlab JSON
Version 0.3.1 PyPI version JSON
download
home_pagehttp://github.com/emin63/oxlab
SummaryTools for Google Colab and Jupyter notebooks.
upload_time2023-11-13 19:29:50
maintainer
docs_urlNone
authorEmin Martinian
requires_python
licenseLicense :: OSI Approved :: MIT License
keywords google colab jupyter notebooks
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Introduction
============

The ``oxlab`` package provides tools for Google Colab and Jupyter
notebooks.

Sometimes you want to be able to use or distribute private GitHub repos
in Jupyter notebooks that people may run on their local systems or in
Google Colab. This project provides a simple way to accomplish that
goal.

Imagine you have an example notebook called ``oxlab_demo.ipynb`` and you
want to have it reference a private GitHub repo for your project.

You can take the following steps:

#. Generate an SSH deploy key for your project via something like:

   .. code:: shell

      ssh-keygen -t ecdsa -f /tmp/example_deploy_key_id_ecdsa

#. Upload the public key (which is saved at
   ``/tmp/example_deploy_key_id_ecdsa.pub`` if you used the above
   command) to GitHub as discussed in the `instructions on deploy
   keys <https://docs.github.com/en/authentication/connecting-to-github-with-ssh/managing-deploy-keys#deploy-keys>`__.
#. Create a cell in your notebook like the following where you replace
   ``$YOUR_PRIVATE_KEY`` with your ssh deploy key generated in step 1
   (e.g., the contents of ``/tmp/example_deploy_key_id_ecdsa``), replace
   ``$OWNER`` with the owner of your GitHub repo (e.g., ``emin63``) and
   ``$REPO`` with your repo (e.g., ``oxlab``):

   ::

      # @title Pull in our private github repo
      SSH_DEPLOY_KEY = $YOUR_PRIVATE_KEY
      !pip install oxlab
      from oxlab import github
      oxlab.add_github_repo($OWNER, $REPO, SSH_DEPLOY_KEY)

#. Then the rest of your notebook will be able to do something like
   ``import $REPO`` and reference your private GitHub code.

See the `oxlab_demo.ipynb
notebook <https://github.com/emin63/oxlab/blob/main/oxlab_demo.ipynb>`__
for an example.

            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/emin63/oxlab",
    "name": "oxlab",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "google colab jupyter notebooks",
    "author": "Emin Martinian",
    "author_email": "emin.martinian@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/49/f2/d8a5be3c50615c2ffa054f39e1236cc59bd3ab6268fec2b2c6d2643e70a7/oxlab-0.3.1.tar.gz",
    "platform": null,
    "description": "Introduction\n============\n\nThe ``oxlab`` package provides tools for Google Colab and Jupyter\nnotebooks.\n\nSometimes you want to be able to use or distribute private GitHub repos\nin Jupyter notebooks that people may run on their local systems or in\nGoogle Colab. This project provides a simple way to accomplish that\ngoal.\n\nImagine you have an example notebook called ``oxlab_demo.ipynb`` and you\nwant to have it reference a private GitHub repo for your project.\n\nYou can take the following steps:\n\n#. Generate an SSH deploy key for your project via something like:\n\n   .. code:: shell\n\n      ssh-keygen -t ecdsa -f /tmp/example_deploy_key_id_ecdsa\n\n#. Upload the public key (which is saved at\n   ``/tmp/example_deploy_key_id_ecdsa.pub`` if you used the above\n   command) to GitHub as discussed in the `instructions on deploy\n   keys <https://docs.github.com/en/authentication/connecting-to-github-with-ssh/managing-deploy-keys#deploy-keys>`__.\n#. Create a cell in your notebook like the following where you replace\n   ``$YOUR_PRIVATE_KEY`` with your ssh deploy key generated in step 1\n   (e.g., the contents of ``/tmp/example_deploy_key_id_ecdsa``), replace\n   ``$OWNER`` with the owner of your GitHub repo (e.g., ``emin63``) and\n   ``$REPO`` with your repo (e.g., ``oxlab``):\n\n   ::\n\n      # @title Pull in our private github repo\n      SSH_DEPLOY_KEY = $YOUR_PRIVATE_KEY\n      !pip install oxlab\n      from oxlab import github\n      oxlab.add_github_repo($OWNER, $REPO, SSH_DEPLOY_KEY)\n\n#. Then the rest of your notebook will be able to do something like\n   ``import $REPO`` and reference your private GitHub code.\n\nSee the `oxlab_demo.ipynb\nnotebook <https://github.com/emin63/oxlab/blob/main/oxlab_demo.ipynb>`__\nfor an example.\n",
    "bugtrack_url": null,
    "license": "License :: OSI Approved :: MIT License",
    "summary": "Tools for Google Colab and Jupyter notebooks.",
    "version": "0.3.1",
    "project_urls": {
        "Homepage": "http://github.com/emin63/oxlab"
    },
    "split_keywords": [
        "google",
        "colab",
        "jupyter",
        "notebooks"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "17b0e02cb30a9617e485199a9fc1a499b27511f4389122269fdfd352cb8b03cf",
                "md5": "3081c0bdbcb38996a196ad5282c81438",
                "sha256": "d538f62ff8a9e2d45323e07b58fe9c3afccc9cc5b471b01d5a14cf91e3857235"
            },
            "downloads": -1,
            "filename": "oxlab-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3081c0bdbcb38996a196ad5282c81438",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5238,
            "upload_time": "2023-11-13T19:29:42",
            "upload_time_iso_8601": "2023-11-13T19:29:42.770657Z",
            "url": "https://files.pythonhosted.org/packages/17/b0/e02cb30a9617e485199a9fc1a499b27511f4389122269fdfd352cb8b03cf/oxlab-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "49f2d8a5be3c50615c2ffa054f39e1236cc59bd3ab6268fec2b2c6d2643e70a7",
                "md5": "c403b0fb1c0c05aef82f7122fe0cedbc",
                "sha256": "2b1593201af3d81d07e7c8d4162f6c773e003ecf143c340bd6b5665087695b26"
            },
            "downloads": -1,
            "filename": "oxlab-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "c403b0fb1c0c05aef82f7122fe0cedbc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5223,
            "upload_time": "2023-11-13T19:29:50",
            "upload_time_iso_8601": "2023-11-13T19:29:50.227897Z",
            "url": "https://files.pythonhosted.org/packages/49/f2/d8a5be3c50615c2ffa054f39e1236cc59bd3ab6268fec2b2c6d2643e70a7/oxlab-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-13 19:29:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "emin63",
    "github_project": "oxlab",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "oxlab"
}
        
Elapsed time: 0.13433s