This directory contains example clients demonstrating how to interact with the OstrichDB API layer in various programming languages. These examples are meant to serve as references and starting points for building your own client implementations.
- C Client
- C++ Client
- Python Client
- Go Client
- Java Client
- JavaScript Client
- PHP Client
- Ruby Client
- Rust Client
- Swift Client
- Dart
- Kotlin
- Haskell
- Odin
- Lua
Some current examples and possibly future examples require additional libraries or dependencies. Please ensure that you have the proper dependencies installed for each example.
No additional dependencies are required as it uses the built-in fetch API.
No additional dependencies are required as it uses the built-in net/http package.
No additional dependencies are required as it uses the built-in net/http library.
No additional dependencies are required as it uses the built-in file_get_contents function.
No additional dependencies are required as it uses the built-in URLSession API.
- Ensure the OstrichDB server is running. It runs on:
localhost:8042
- Choose the example in your preferred language.
- If necessary, install the required dependencies.
- If necessary, modify the examples code to match your specific use case.
- Follow any instructions provided in the example.
- Run the example client.
The above examples demonstrate the basic patterns for:
- Making HTTP requests to OstrichDB endpoints
- Handling responses and errors from the server
- Working with OstrichDB collections, clusters, and records
Key points to remember when building your own client:
- Use appropriate HTTP methods (GET, POST, PUT, DELETE, HEAD)
- Set content-type headers to "text/plain"
- Follow the URL pattern structure:
- Collections:
/c/{collection_name}
- Clusters:
/c/{collection_name}/cl/{cluster_name}
- Records:
/c/{collection_name}/cl/{cluster_name}/r/{record_name}
sometimes with query parameters
- Collections: