Skip to content

Commit

Permalink
Work on tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
docktermj committed Oct 9, 2024
1 parent eac0fd2 commit e3bd94b
Show file tree
Hide file tree
Showing 5 changed files with 188 additions and 86 deletions.
92 changes: 16 additions & 76 deletions proposals/quickstart-grpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,98 +6,38 @@ The Senzing QuickStart using Python over gRPC works on Linux, macOS, and Windows

The Senzing QuickStart using Python over gRPC requires the following prerequisites:

1. [Python 3]
1. [Docker]
1. :warning: If using Docker Desktop, be sure [host networking is enabled].
1. [senzing-grpc] Python package.
To install, run:

```console
python3 -m pip install --upgrade senzing-grpc

```

## Run Docker container

4. After installing [prerequisites], run the Docker container.
Example:

```console
docker run \
--name senzing-demo-quickstart \
--net=host \
--user 0 \
-p 8260:8260 \
-p 8261:8261 \
-p 8888:8888 \
--pull always \
--rm \
senzing/demo-quickstart
```

## Try Senzing's Hello World

The following example shows how to start
the Senzing QuickStart using Python over gRPC
and access it with Python.

5. In a separate window, start an interactive Python session.
2. After installing [prerequisites], run the Docker container.
Example:

```console
python3

docker run -it --name senzing-demo-quickstart -p 8260:8260 -p 8261:8261 --pull always --rm senzing/demo-quickstart
```

1. For a quick test of calling Senzing's `sz_product.get_version()`,
copy/paste the following block of code into the interactive Python session
and press the **Enter** key.
Example:

```python
import grpc
from senzing_grpc import SzAbstractFactory
sz_abstract_factory = SzAbstractFactory(grpc_channel=grpc.insecure_channel("localhost:8261"))
sz_product = sz_abstract_factory.create_sz_product()
print(sz_product.get_version())

```

or download and run
[senzing_hello_world.py](https://raw.githubusercontent.com/senzing-garage/knowledge-base/main/proposals/quickstart-grpc/senzing_hello_world.py).

1. To end the interactive Python session,
copy/paste the following block of code into the interactive Python session
and press the **Enter** key.

```python
quit()

```

1. To stop the Docker container,
use `ctrl-c` to stop the `docker run ...` program.

## Next steps

Now that an environment is setup,
feel free to explore Senzing.
Now that an environment is setup, feel free to explore Senzing.

- Linux / macOs
1. Try Senzing's Hello World
1. [Use Senzing's Truth Set data - Linux/macOS]
1. [Map and load your own data - Linux/macOS]
- Windows
1. Try Senzing's Hello World
1. [Use Senzing's Truth Set data - Windows]
1. [Map and load your own data - Windows]
3. Visit [http://localhost:8260] for Jupyter Lab demonstration.
1. Native Python Software Development Kit (SDK) demonstrations:
1. Linux / macOs
1. [Try Senzing's Hello World - Linux/macOS]
1. [Use Senzing's Truth Set data - Linux/macOS]
1. [Map and load your own data - Linux/macOS]
1. Windows
1. [Try Senzing's Hello World - Windows]
1. [Use Senzing's Truth Set data - Windows]
1. [Map and load your own data - Windows]

[Docker]: https://github.com/senzing-garage/knowledge-base/blob/main/WHATIS/docker.md
[host networking is enabled]: https://docs.docker.com/engine/network/drivers/host/#docker-desktop
[http://localhost:8260]: http://localhost:8260
[Map and load your own data - Linux/macOS]: map-and-load-your-own-data-linux-macos.md
[Map and load your own data - Windows]: map-and-load-your-own-data-windows.md
[prerequisites]: #prerequisistes
[Python 3]: https://github.com/senzing-garage/knowledge-base/blob/main/WHATIS/python3.md
[senzing-grpc]: https://github.com/senzing-garage/sz-sdk-python-grpc
[Try Senzing's Hello World - Linux/macOS]: hello-world-linux-macos.md
[Try Senzing's Hello World - Windows]: hello-world-windows.md
[Use Senzing's Truth Set data - Linux/macOS]: use-senzings-truth-set-data-linux-macos.md
[Use Senzing's Truth Set data - Windows]: use-senzings-truth-set-data-windows.md
74 changes: 74 additions & 0 deletions proposals/quickstart-grpc/hello-world-linux-macos.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Try Senzing's Hello World

The Senzing QuickStart using Python over gRPC works on Linux, macOS, and Windows.

## Prerequisistes

The Senzing QuickStart using Python over gRPC requires the following prerequisites:

1. [Run senzing/demo-quickstart Docker container].
1. [Python 3]
1. [senzing-grpc] Python package.
To install, run:

```console
python3 -m pip install --upgrade senzing-grpc

```

## View Senzing version

The following example shows how to start
the Senzing QuickStart using Python over gRPC
and access it with Python.

4. In a separate window, start an interactive Python session.
Example:

```console
python3

```

1. For a quick test of calling Senzing's `sz_product.get_version()`,
copy/paste the following block of code into the interactive Python session
and press the **Enter** key.
Example:

```python
import grpc
from senzing_grpc import SzAbstractFactory
sz_abstract_factory = SzAbstractFactory(grpc_channel=grpc.insecure_channel("localhost:8261"))
sz_product = sz_abstract_factory.create_sz_product()
print(sz_product.get_version())

```

or download and run
[senzing_hello_world.py](https://raw.githubusercontent.com/senzing-garage/knowledge-base/main/proposals/quickstart-grpc/senzing_hello_world.py).

1. To end the interactive Python session,
copy/paste the following block of code into the interactive Python session
and press the **Enter** key.

```python
quit()

```

1. To stop the Docker container,
use `ctrl-c` to stop the `docker run ...` program.

## Next steps

8. [Overview]
1. Try Senzing's Hello World - Linux/macOS
1. [Use Senzing's Truth Set data - Linux/macOS]
1. [Map and load your own data - Linux/macOS]

[Map and load your own data - Linux/macOS]: map-and-load-your-own-data-linux-macos.md
[Overview]: README.md
[Python 3]: https://github.com/senzing-garage/knowledge-base/blob/main/WHATIS/python3.md
[Run senzing/demo-quickstart Docker container]: README.md#run-docker-container
[senzing-grpc]: https://github.com/senzing-garage/sz-sdk-python-grpc
[Use Senzing's Truth Set data - Linux/macOS]: use-senzings-truth-set-data-linux-macos.md
84 changes: 84 additions & 0 deletions proposals/quickstart-grpc/hello-world-windows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Try Senzing's Hello World

The Senzing QuickStart using Python over gRPC works on Linux, macOS, and Windows.

## Prerequisistes

The Senzing QuickStart using Python over gRPC requires the following prerequisites:

1. [Run senzing/demo-quickstart Docker container]
1. [Python 3]
1. [senzing-grpc] Python package.
To install, run:

```console
python3 -m pip install --upgrade senzing-grpc

```

## View Senzing version

The following example shows how to start
the Senzing QuickStart using Python over gRPC
and access it with Python.

4. In a separate window, start an interactive Python session.
Example:

```console
python3

```

1. For a quick test of calling Senzing's `sz_product.get_version()`,
copy/paste the following block of code into the interactive Python session
and press the **Enter** key.
Example:

```python
import grpc
from senzing_grpc import SzAbstractFactory
sz_abstract_factory = SzAbstractFactory(grpc_channel=grpc.insecure_channel("localhost:8261"))
sz_product = sz_abstract_factory.create_sz_product()
print(sz_product.get_version())

```

or download and run
[senzing_hello_world.py](https://raw.githubusercontent.com/senzing-garage/knowledge-base/main/proposals/quickstart-grpc/senzing_hello_world.py).

1. To end the interactive Python session,
copy/paste the following block of code into the interactive Python session
and press the **Enter** key.

```python
quit()

```

1. To stop the Docker container,
use `ctrl-c` to stop the `docker run ...` program.

## Next steps

Now that an environment is setup,
feel free to explore Senzing.

- [Overview]
- Linux / macOs
1. Try Senzing's Hello World
1. [Use Senzing's Truth Set data - Linux/macOS]
1. [Map and load your own data - Linux/macOS]
- Windows
1. Try Senzing's Hello World
1. [Use Senzing's Truth Set data - Windows]
1. [Map and load your own data - Windows]

[Map and load your own data - Linux/macOS]: map-and-load-your-own-data-linux-macos.md
[Map and load your own data - Windows]: map-and-load-your-own-data-windows.md
[Overview]: README.md
[Python 3]: https://github.com/senzing-garage/knowledge-base/blob/main/WHATIS/python3.md
[Run senzing/demo-quickstart Docker container]: README.md#run-docker-container
[senzing-grpc]: https://github.com/senzing-garage/sz-sdk-python-grpc
[Use Senzing's Truth Set data - Linux/macOS]: use-senzings-truth-set-data-linux-macos.md
[Use Senzing's Truth Set data - Windows]: use-senzings-truth-set-data-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ and custom ports will be used.

## Prerequisites

1. [Run Docker container].
1. [Run senzing/demo-quickstart Docker container].

## Create your input file

Expand Down Expand Up @@ -139,21 +139,23 @@ and custom ports will be used.

## Shutdown

6. To end the Senzing gRPC service using Docker,
7. To end the Senzing gRPC service using Docker,
use `ctrl-c` to stop the `docker run ...` program.

## Next steps

1. [Try Senzing's Hello World]
8. [Overview]
1. [Try Senzing's Hello World - Linux/macOS]
1. [Use Senzing's Truth Set data - Linux/macOS]
1. Map and load your own data - Linux/macOS

## References

1. [View SQLite database]

[Run Docker container]: README.md#run-docker-container
[Try Senzing's Hello World]: README.md
[High performance loading with Python]: #
[Overview]: README.md
[Run senzing/demo-quickstart Docker container]: README.md#run-docker-container
[Try Senzing's Hello World - Linux/macOS]: hello-world-linux-macos.md
[Use Senzing's Truth Set data - Linux/macOS]: use-senzings-truth-set-data-linux-macos.md
[View SQLite database]: coleifer-sqlite-web.md
[High performance loading with Python]: #
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Senzing database inside the running Docker container.

## Prerequisites

1. [Run Docker container]
1. [Run senzing/demo-quickstart Docker container].

## Start interactive Python session

Expand Down Expand Up @@ -163,7 +163,8 @@ Senzing database inside the running Docker container.

## Next steps

1. [Try Senzing's Hello World]
9. [Overview]
1. [Try Senzing's Hello World - Linux/macOS]
1. Use Senzing's Truth Set data - Linux/macOS
1. [Map and load your own data - Linux/macOS]

Expand All @@ -172,9 +173,10 @@ Senzing database inside the running Docker container.
1. [View SQLite database](coleifer-sqlite-web.md)

[Map and load your own data - Linux/macOS]: map-and-load-your-own-data-linux-macos.md
[Run Docker container]: README.md#run-docker-container
[Try Senzing's Hello World]: README.md
[Overview]: README.md
[Run senzing/demo-quickstart Docker container]: README.md#run-docker-container
[senzing_truthset_add_datasources.py]: https://raw.githubusercontent.com/senzing-garage/knowledge-base/main/proposals/streamline/senzing_truthset_add_datasources.py
[senzing_truthset_add_records.py]: https://raw.githubusercontent.com/senzing-garage/knowledge-base/main/proposals/streamline/senzing_truthset_add_records.py
[senzing_truthset_get_entity.py]: https://raw.githubusercontent.com/senzing-garage/knowledge-base/main/proposals/streamline/senzing_truthset_get_entity.py
[senzing_truthset_search.py]: https://raw.githubusercontent.com/senzing-garage/knowledge-base/main/proposals/streamline/senzing_truthset_search.py
[Try Senzing's Hello World - Linux/macOS]: hello-world-linux-macos.md

0 comments on commit e3bd94b

Please sign in to comment.