Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@
[![pypi](https://img.shields.io/pypi/v/sift-stack-py)](https://pypi.org/project/sift-stack-py/)
[![Crates.io](https://img.shields.io/crates/v/sift_rs.svg)](https://crates.io/crates/sift_rs)
[![Crates.io](https://img.shields.io/crates/v/sift_stream.svg)](https://crates.io/crates/sift_stream)
[![PkgGoDev](https://pkg.go.dev/badge/mod/github.com/sif-stack/sift/go)](https://pkg.go.dev/github.com/sift-stack/sift/go)
[![PkgGoDev](https://pkg.go.dev/badge/mod/github.com/sift-stack/sift/go)](https://pkg.go.dev/github.com/sift-stack/sift/go)

This repository contains client libraries and protocol buffers to interact with Sift's API in various languages. Each client library contains pre-compiled protocol buffers, but should you wish
to compile the protocol buffers yourself there are instructions on how to go about it in the [Manual Protobuf Compilation](#manual-protobuf-compilation) section.

**Language-specific documentation:**
- [Python](/python/)
- [Rust](/rust/)
- [Go](/go/)
- [C++](/cpp/)

## Table of Contents

* [Installation](#installation)
Expand All @@ -20,7 +26,6 @@ to compile the protocol buffers yourself there are instructions on how to go abo
- [Rust](#rust)
- [Python](#python)
- [Manual Protobuf Compilation](#manual-protobuf-compilation)
* [Examples](#examples)

## Installation

Expand Down Expand Up @@ -57,4 +62,4 @@ For manual installation instructions for a particular supported programming lang
- [Python](/docs/python.md)
- [C++](/cpp/README.md)

Please keep in mind that the manual installation instructions aims to be general and do not need to be strictly followed. Users are encouraged to modify any of the steps or proceed with a custom setup if it better suits the needs of their project.
Please keep in mind that the manual installation instructions aim to be general and do not need to be strictly followed. Users are encouraged to modify any of the steps or proceed with a custom setup if it better suits the needs of their project.
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ If you come across security vulnerability please do the following:
1. Notify the Sift team immediately through the shared Slack channels.
2. File a bug report at [this link](https://customer.support.siftstack.com/servicedesk/customer/portal/2/group/2/create/9).

Please take care not to make publicize this report as it may put other users at risk.
Please take care not to publicize this report as it may put other users at risk.
4 changes: 2 additions & 2 deletions docs/go.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $ cd sift
$ buf export protos --output=$PROJECT_DIR/protos --config protos/buf.yaml
```

The Sift protos can and its imports can now be found in your `$PROJECT_DIR/protos` directory.
The Sift protos and its imports can now be found in your `$PROJECT_DIR/protos` directory.

3. Copy the `buf` template for Go to your project directory:

Expand Down Expand Up @@ -91,4 +91,4 @@ Your project up to this point should look like the following (full depth not sho
$ go get -d ./...
```

8. Now your project should be ready to use the generated Go code to interact with Sift's gRPC API. Please refer to the [example code](/examples/go) for usage.
8. Now your project should be ready to use the generated Go code to interact with Sift's gRPC API. Please refer to the [example code](/go/examples) for usage.
4 changes: 2 additions & 2 deletions docs/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $ cd sift
$ buf export protos --output=$PACKAGE_DIR/protos --config protos/buf.yaml
```

The Sift protos can and its imports can now be found in your `$PACKAGE_DIR/protos` directory.
The Sift protos and its imports can now be found in your `$PACKAGE_DIR/protos` directory.

3. Copy the `buf` template for Python to `$PACKAGE_DIR`

Expand Down Expand Up @@ -147,4 +147,4 @@ the generated wheel file should be outputted into `$PACKAGE_DIR/dist/sift_protos
$ pip install $PACKAGE_DIR/sift_protos-0.1-py3-none-any.whl
```

14. Now your project should be ready to use the generated Python code to interact with Sift's gRPC API. Please refer to the [example code](/examples/python) for usage.
14. Now your project should be ready to use the generated Python code to interact with Sift's gRPC API. Please refer to the [example code](/python/examples) for usage.
10 changes: 5 additions & 5 deletions docs/rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ $ cd sift
$ buf export protos --output=$PROJECT_DIR/protos --config protos/buf.yaml
```

The Sift protos can and its imports can now be found in your `$PROJECT_DIR/protos` directory.
The Sift protos and its imports can now be found in your `$PROJECT_DIR/protos` directory.

3. Copy the `buf` template for Rust to your project directory:

```bash
$ cp buf_templates/buf.gen.go.yaml $PROJECT_DIR/buf.gen.yaml
$ cp buf_templates/buf.gen.rust.yaml $PROJECT_DIR/buf.gen.yaml
```

4. `cd` into your Rust project at `$PROJECT_DIR`.

5. Once inside of your Rust project, declare a module called `gen` in your `main.rs` (unless you're crate is a lib-crate) and create a `src/gen/mod.rs` file.
5. Once inside of your Rust project, declare a module called `gen` in your `main.rs` (unless your crate is a lib-crate) and create a `src/gen/mod.rs` file.

```rust
// main.go
// main.rs

/// Sift generated code
mod gen;
Expand Down Expand Up @@ -103,4 +103,4 @@ tonic = { version = "0.11.0", features = ["tls", "tls-roots", "tls-webpki-roots"
pub mod annotations;
```

9. Now your project should be ready to use the generated Rust code to interact with Sift's gRPC API. Please refer to the [example code](/examples/rust/) for usage.
9. Now your project should be ready to use the generated Rust code to interact with Sift's gRPC API. Please refer to the [example code](/rust/crates/sift_rs/examples) for usage.
2 changes: 1 addition & 1 deletion go/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Sift Go

[![PkgGoDev](https://pkg.go.dev/badge/mod/github.com/sif-stack/sift/go)](https://pkg.go.dev/github.com/sift-stack/sift/go)
[![PkgGoDev](https://pkg.go.dev/badge/mod/github.com/sift-stack/sift/go)](https://pkg.go.dev/github.com/sift-stack/sift/go)

This library offers a Go API on top of Sift's protocol buffers to ergonomically interface with the Sift gRPC API.

Expand Down
31 changes: 31 additions & 0 deletions python/docs/examples/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Examples Directory

This section contains interactive Jupyter notebook examples demonstrating how to use the Sift Python client library.

## Available Examples

- **[Basic Usage](basic.ipynb)** - Introduction to the Sift Python client, covering basic operations and API usage
- **[Data Ingestion](ingestion.ipynb)** - Learn how to ingest telemetry data into Sift using various methods

## Running Examples Locally

To run these examples on your local machine:

1. Install the Sift Python client:
```bash
pip install sift-stack-py
```

2. Set up your environment variables in a `.env` file next to the notebook files:
```bash
SIFT_API_KEY="your-api-key"
SIFT_GRPC_URI="your-sift-grpc-url"
SIFT_REST_URI="your-sift-rest-url"
```

3. Open the notebooks in Jupyter after downloading them:
```bash
jupyter notebook
```

For more examples including command-line scripts, see the [examples directory](https://github.com/sift-stack/sift/tree/main/python/examples) in the repository.
2 changes: 1 addition & 1 deletion python/lib/sift_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ async def main():

## Examples

For complete examples, see the [examples](../examples/) directory.
For complete examples, see the [examples](../../examples/) directory.

## Connection Configuration

Expand Down
5 changes: 3 additions & 2 deletions python/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ nav:
- Sift Py API
- Sift Client API (New)
- Examples:
- examples/basic.ipynb
- examples/ingestion.ipynb
- examples/index.md
- Basic Usage: examples/basic.ipynb
- Data Ingestion: examples/ingestion.ipynb
# - Guides:
# - Logging
# - Error Handling
Expand Down
Loading