mirror of
https://github.com/google/bumble.git
synced 2026-04-16 00:25:31 +00:00
refactor doc
This commit is contained in:
@@ -20,7 +20,7 @@ You may be simply using Bumble as a module for your own application or as a depe
|
||||
module, or you may be working on modifying or contributing to the Bumble module or example code
|
||||
itself.
|
||||
|
||||
# Working With Bumble As A Module
|
||||
# Using Bumble As A Python Module
|
||||
|
||||
## Installing
|
||||
|
||||
@@ -29,48 +29,13 @@ manager, or from source.
|
||||
|
||||
!!! tip "Python Virtual Environments"
|
||||
When you install Bumble, you have the option to install it as part of your default
|
||||
python environment, or in a virtual environment, such as a `venv`, `pyenv` or `conda` environment
|
||||
|
||||
### venv
|
||||
|
||||
`venv` is a standard module that is included with python.
|
||||
Visit the [`venv` documentation](https://docs.python.org/3/library/venv.html) page for details.
|
||||
|
||||
### Pyenv
|
||||
|
||||
`pyenv` lets you easily switch between multiple versions of Python. It's simple, unobtrusive, and follows the UNIX tradition of single-purpose tools that do one thing well.
|
||||
Visit the [`pyenv` site](https://github.com/pyenv/pyenv) for instructions on how to install
|
||||
and use `pyenv`
|
||||
|
||||
### Conda
|
||||
|
||||
Conda is a convenient package manager and virtual environment.
|
||||
The file `environment.yml` is a Conda environment file that you can use to create
|
||||
a new Conda environment. Once created, you can simply activate this environment when
|
||||
working with Bumble.
|
||||
Visit the [Conda side](https://docs.conda.io/en/latest/) for instructions on how to install
|
||||
and use Conda.
|
||||
A few useful commands:
|
||||
|
||||
#### Create a new `bumble` Conda environment
|
||||
```
|
||||
$ conda env create -f environment.yml
|
||||
```
|
||||
This will create a new environment, named `bumble`, which you can then activate with:
|
||||
```
|
||||
$ conda activate bumble
|
||||
```
|
||||
|
||||
#### Update an existing `bumble` environment
|
||||
```
|
||||
$ conda env update -f environment.yml
|
||||
```
|
||||
python environment, or in a virtual environment, such as a `venv`, `pyenv` or `conda` environment.
|
||||
See the [Python Environments page](development/python_environments.md) page for details.
|
||||
|
||||
### Install From Source
|
||||
|
||||
The instructions for working with virtual Python environments above also apply in this case.
|
||||
|
||||
Install with `pip`
|
||||
Install with `pip`. Run in a command shell in the directory where you downloaded the source
|
||||
distribution
|
||||
```
|
||||
$ python -m pip install -e .
|
||||
```
|
||||
@@ -129,3 +94,8 @@ Setting `PYTHONPATH` locally with each command would look something like:
|
||||
```
|
||||
$ PYTHONPATH=. python examples/run_advertiser.py examples/device1.json serial:/dev/tty.usbmodem0006839912171
|
||||
```
|
||||
|
||||
# Where To Go Next
|
||||
Once you've installed or downloaded Bumble, you can either start using some of the
|
||||
[Bundled apps and tools](apps_and_tools/index.md), or look at the [examples](examples/index.md)
|
||||
to get a feel for how to use the APIs, and start writing your own applications.
|
||||
Reference in New Issue
Block a user