Trickster
Trickster is a Python/Flask application providing configurable API. It allows you to configure requests and responses using REST API.
Usecases
- Local development. Sometimes your app needs lots of other services to work properly. Setting all that infrastructure might me time consuming and sometimes not even possible. Mock Service allows you to mock all necessary upstream services.
- Integration testing. The same way you need to setup infrastructure to develop locally, it might equally difficult to setup integration environment. Some services are just too hard to configure so you can test all scenarios. By using Mock Service you define expected behaviour. If you later find a bug, it's easy to find if your assumptions about the infrastructure was wrong or if there's a bug somewhere else.
- Performance testing. When running performance tests, the upstream services might cause a bottleneck. The test then actually tests your infrastructure, not your application. Or you might want to test what your application will do when all the dependencies start responding slowly or raise errors.
- Distributing work. Distributing work on new project between teams is challenging when you don't have a working API. Mock Service allows you to specify and document the API beforehand so everyone can start developing as if they have everything they need.
Quickstart
Create new Route:
curl --location --request POST 'http://127.0.0.1:8080/internal/routes' --header 'Content-Type: application/json' --data-raw '{
"path": "/hello_world",
"responses": [
{
"body": "Hello Word!"
}
]
}'
You configured a new Route that lives on /hello_word. When you call it, it will return HTTP 200 and string Hello Word.
You can test it by calling:
curl --location --request GET 'http://127.0.0.1:8080/hello_word'
You can find more information about this example in the Cookbook.
Of course, Trickster provides way more possibilities to configure how the Routes will work. All features are described in Documentation.
Metadata
Release files for Trickster 2.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| trickster-2.0.2.tar.gz | 8.9 kB | Without provenance | Details for trickster-2.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| trickster-2.0.2-py3-none-any.whl | Python 3 | none | any | Details for trickster-2.0.2-py3-none-any.whl |
Total release size: 17.4 kB
Release files / trickster-2.0.2.tar.gz
| Download URL | trickster-2.0.2.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1eb04608d40594be2512032f35126e9f7a2387fa481598eec5356cdd613bb52f
|
|
BLAKE2b-256 checksum How to use checksums |
7e39ea9e36a8cc510f0be78efc604e1d28f674cc007f8c903e994855c3c74ebf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9
|
Release files / trickster-2.0.2-py3-none-any.whl
| Download URL | trickster-2.0.2-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e32c0955d2ccbe72942a62792677849456c8ed830520e16e9d18c4021cdaba6
|
|
BLAKE2b-256 checksum How to use checksums |
b040b22ebba17b003539f318a08ac4c52f22018ebe23db7762b841bfe1b22c9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9
|
Security for Trickster 2.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.