Skip to content

Commit

Permalink
Merge pull request #262 from authzed/add-client-documentation
Browse files Browse the repository at this point in the history
Add additional client documentation
  • Loading branch information
tstirrat15 authored Sep 18, 2024
2 parents 578b300 + db90190 commit 3c3374c
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 21 deletions.
1 change: 1 addition & 0 deletions pages/spicedb/getting-started/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"installing-zed": "Installing Zed",
"coming-from": "Coming From",
"protecting-a-blog": "Protecting a Blog Application",
"client-libraries": "Client Libraries",
"faq": "FAQ"
}
49 changes: 49 additions & 0 deletions pages/spicedb/getting-started/client-libraries.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Official Client Libraries

SpiceDB is primarily accessed by a [gRPC] API and thus client libraries can be generated for any programming language.

AuthZed builds and maintains gRPC client libraries for the following languages:

- [Go](https://github.com/authzed/authzed-go)
- [Node](https://github.com/authzed/authzed-node)
- [Python](https://github.com/authzed/authzed-py)
- [Ruby](https://github.com/authzed/authzed-rb)
- [Java](https://github.com/authzed/authzed-java)
- [Dotnet](https://github.com/authzed/authzed-dotnet)

Because the above libraries are generated from protobuf definitions in our [API repo],
the primary documentation for the gRPC API is in the [buf documentation] for SpiceDB's services.
The gRPC client documentation associated with each host language will also be helpful for putting together invocations.
Additionally, there are `example` directories in the client libraries that provide example usages.

## HTTP Clients

SpiceDB exposes an HTTP API when run with the `--http-enabled` flag.
While Authzed doesn't officially maintain HTTP client libraries, there are [OpenAPI] docs available
both in [the authzed-go git repo](https://github.com/authzed/authzed-go/blob/main/proto/apidocs.swagger.json)
and served by a SpiceDB instance running the HTTP server.
For example:

```sh
docker run --rm -p 50051:50051 -p 8443:8443 authzed/spicedb serve --http-enabled --grpc-preshared-key <preshared key>

curl localhost:8443/openapi.json
```

The OpenAPI JSON can then be converted into a client using a tool like [openapi-ts] or [openapi-python-client].

## Other Clients

AuthZed also develops [zed], a command-line client for interacting with the SpiceDB API.

You can find more languages and integrations maintained by the community in the [Clients section] of the [Awesome SpiceDB] repository.

[grpc]: https://grpc.io
[zed]: https://github.com/authzed/zed
[clients section]: https://github.com/authzed/awesome-spicedb#clients
[awesome spicedb]: https://github.com/authzed/awesome-spicedb
[api repo]: https://github.com/authzed/api
[buf documentation]: https://buf.build/authzed/api/docs/main:authzed.api.v1
[openapi]: https://www.openapis.org/
[openapi-ts]: https://github.com/hey-api/openapi-ts
[openapi-python-client]: https://github.com/openapi-generators/openapi-python-client
21 changes: 0 additions & 21 deletions pages/spicedb/getting-started/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,6 @@ There are two conditions under which code is kept proprietary:
[apache]: https://www.tldrlegal.com/license/apache-license-2-0-apache-2-0
[mit]: https://www.tldrlegal.com/license/mit-license

### What programming languages does SpiceDB support?

SpiceDB is primarily accessed by a [gRPC] API and thus client libraries can be generated for any programming language.

AuthZed builds and maintains client libraries for the following languages:

- [Go](https://github.com/authzed/authzed-go)
- [Node](https://github.com/authzed/authzed-node)
- [Python](https://github.com/authzed/authzed-py)
- [Ruby](https://github.com/authzed/authzed-rb)
- [Java](https://github.com/authzed/authzed-java)

AuthZed also develops [zed], a command-line client for interacting with the SpiceDB API.

You can find more languages and integrations maintained by the community in the [Clients section] of the [Awesome SpiceDB] repository.

[grpc]: https://grpc.io
[zed]: https://github.com/authzed/zed
[clients section]: https://github.com/authzed/awesome-spicedb#clients
[awesome spicedb]: https://github.com/authzed/awesome-spicedb

### Does SpiceDB secure IT infrastructure?

SpiceDB is a database designed to be integrated into applications.
Expand Down

0 comments on commit 3c3374c

Please sign in to comment.