# notebook-environments


Manage python virtual environments on the working notebook server.

## Installation
It is recommended to use this package together with [virtualenv](https://github.com/pypa/virtualenv) and [virtualenvwrapper](https://bitbucket.org/virtualenvwrapper/virtualenvwrapper) to work with python virtual environments more suitable. Make sure the installed [python](https://wiki.archlinux.org/title/python) interpreters work without errors on the current operating system. To install this package as a standalone application with the command-line interface you are to run the following command:
```bash
sudo sh -c "$(curl https://raw.githubusercontent.com/vladpunko/notebook-environments/master/install.sh)"
```
Use the package manager [pip](https://pip.pypa.io/en/stable) to install notebook-environments without the command-line interface:
```bash
python3 -m pip install notebook-environments
```
You can also install this python package on your working machine (works for unix-like operating systems) from source code to `/usr/local/bin` as the standard system location for user's programs (this location can be changed at the user's discretion):
```bash
# Step -- 1.
git clone --depth=1 --branch=master https://github.com/vladpunko/notebook-environments.git
# Step -- 2.
cd ./notebook-environments/
# Step -- 3.
sudo install -m 755 n.sh /usr/local/bin/n
# Step -- 4.
sudo install -m 755 notebook_environments.py /usr/local/bin/notebook-environments
```
## Basic usage
Using this program allows you to run one instance of [notebook](https://github.com/jupyter/notebook) server on your working machine and add different python virtual environments as needed.
It protects you from the trouble of installing notebook packages in a new environment and running multiple servers.
```bash
# Step -- 1.
nohup jupyter notebook > /tmp/notebook.log 2>&1 &
# Step -- 2.
python3 -m venv .venv && source ./.venv/bin/activate && notebook-environments --add
# Step -- 3.
notebook-environments --show
```
## Contributing
Pull requests are welcome.
Please open an issue first to discuss what should be changed.
Please make sure to update tests as appropriate.
```bash
# Step -- 1.
python3 -m venv .venv && source ./.venv/bin/activate && pip install pre-commit tox
# Step -- 2.
pre-commit install --config .githooks.yml
# Step -- 3.
tox && tox -e lint
```
## License
[MIT](https://choosealicense.com/licenses/mit)
Raw data
{
"_id": null,
"home_page": "https://github.com/vladpunko/notebook-environments",
"name": "notebook-environments",
"maintainer": "",
"docs_url": null,
"requires_python": ">=2.7",
"maintainer_email": "",
"keywords": "",
"author": "Vladislav Punko",
"author_email": "iam.vlad.punko@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/c8/f0/e82b1e5bc728323ced6d6fdfe72fdfd02ef5bd33dc4f3111a0af8728b8f8/notebook-environments-0.8.14.tar.gz",
"platform": "macOS",
"description": "# notebook-environments\n\n\n\n\nManage python virtual environments on the working notebook server.\n\n\n\n## Installation\n\nIt is recommended to use this package together with [virtualenv](https://github.com/pypa/virtualenv) and [virtualenvwrapper](https://bitbucket.org/virtualenvwrapper/virtualenvwrapper) to work with python virtual environments more suitable. Make sure the installed [python](https://wiki.archlinux.org/title/python) interpreters work without errors on the current operating system. To install this package as a standalone application with the command-line interface you are to run the following command:\n\n```bash\nsudo sh -c \"$(curl https://raw.githubusercontent.com/vladpunko/notebook-environments/master/install.sh)\"\n```\n\nUse the package manager [pip](https://pip.pypa.io/en/stable) to install notebook-environments without the command-line interface:\n\n```bash\npython3 -m pip install notebook-environments\n```\n\nYou can also install this python package on your working machine (works for unix-like operating systems) from source code to `/usr/local/bin` as the standard system location for user's programs (this location can be changed at the user's discretion):\n\n```bash\n# Step -- 1.\ngit clone --depth=1 --branch=master https://github.com/vladpunko/notebook-environments.git\n\n# Step -- 2.\ncd ./notebook-environments/\n\n# Step -- 3.\nsudo install -m 755 n.sh /usr/local/bin/n\n\n# Step -- 4.\nsudo install -m 755 notebook_environments.py /usr/local/bin/notebook-environments\n```\n\n## Basic usage\n\nUsing this program allows you to run one instance of [notebook](https://github.com/jupyter/notebook) server on your working machine and add different python virtual environments as needed.\nIt protects you from the trouble of installing notebook packages in a new environment and running multiple servers.\n\n```bash\n# Step -- 1.\nnohup jupyter notebook > /tmp/notebook.log 2>&1 &\n\n# Step -- 2.\npython3 -m venv .venv && source ./.venv/bin/activate && notebook-environments --add\n\n# Step -- 3.\nnotebook-environments --show\n```\n\n## Contributing\n\nPull requests are welcome.\nPlease open an issue first to discuss what should be changed.\n\nPlease make sure to update tests as appropriate.\n\n```bash\n# Step -- 1.\npython3 -m venv .venv && source ./.venv/bin/activate && pip install pre-commit tox\n\n# Step -- 2.\npre-commit install --config .githooks.yml\n\n# Step -- 3.\ntox && tox -e lint\n```\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Manage python virtual environments on the working notebook server",
"version": "0.8.14",
"project_urls": {
"Homepage": "https://github.com/vladpunko/notebook-environments",
"Issue tracker": "https://github.com/vladpunko/notebook-environments/issues",
"Source code": "https://github.com/vladpunko/notebook-environments"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b0eba7a48255e8bc3c83120bbcb11551a88b8a296259d5c85ddf54ecd6ac7b17",
"md5": "ad5153b78fc3d8791a63f798b3a95ce5",
"sha256": "aed6c30632cfb482bc1f87780deab66fffc46c067d9dc9b3bbef7011385af590"
},
"downloads": -1,
"filename": "notebook_environments-0.8.14-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "ad5153b78fc3d8791a63f798b3a95ce5",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=2.7",
"size": 10646,
"upload_time": "2024-02-29T22:21:43",
"upload_time_iso_8601": "2024-02-29T22:21:43.540213Z",
"url": "https://files.pythonhosted.org/packages/b0/eb/a7a48255e8bc3c83120bbcb11551a88b8a296259d5c85ddf54ecd6ac7b17/notebook_environments-0.8.14-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c8f0e82b1e5bc728323ced6d6fdfe72fdfd02ef5bd33dc4f3111a0af8728b8f8",
"md5": "ee51734b8d9248d24491390859b5039a",
"sha256": "ffadb65da2204970482f9bae6db6d2362bb8a192818c245e21752ac69f2498da"
},
"downloads": -1,
"filename": "notebook-environments-0.8.14.tar.gz",
"has_sig": false,
"md5_digest": "ee51734b8d9248d24491390859b5039a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=2.7",
"size": 10779,
"upload_time": "2024-02-29T22:21:47",
"upload_time_iso_8601": "2024-02-29T22:21:47.690284Z",
"url": "https://files.pythonhosted.org/packages/c8/f0/e82b1e5bc728323ced6d6fdfe72fdfd02ef5bd33dc4f3111a0af8728b8f8/notebook-environments-0.8.14.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-29 22:21:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "vladpunko",
"github_project": "notebook-environments",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "notebook-environments"
}