microbootstrap 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/PKG-INFO +45 -27
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/README.md +44 -26
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/pyproject.toml +1 -1
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/__init__.py +0 -0
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/bootstrappers/__init__.py +0 -0
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/bootstrappers/base.py +0 -0
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/bootstrappers/litestar.py +0 -0
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/console_writer.py +0 -0
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/exceptions.py +0 -0
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/granian_server.py +0 -0
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/helpers.py +0 -0
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/instruments/__init__.py +0 -0
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/instruments/base.py +0 -0
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/instruments/cors_instrument.py +0 -0
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/instruments/instrument_box.py +0 -0
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/instruments/logging_instrument.py +0 -0
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/instruments/opentelemetry_instrument.py +0 -0
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/instruments/prometheus_instrument.py +0 -0
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/instruments/sentry_instrument.py +0 -0
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/instruments/swagger_instrument.py +0 -0
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/middlewares/__init__.py +0 -0
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/middlewares/fastapi.py +0 -0
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/middlewares/litestar.py +0 -0
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/py.typed +0 -0
- {microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/settings.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: microbootstrap
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Package for bootstrapping new micro-services
|
|
5
5
|
Keywords: python,microservice,bootstrap,opentelemetry,logging,error-tracing,litestar,fastapi
|
|
6
6
|
Author: community-of-python
|
|
@@ -93,6 +93,24 @@ With <b>microbootstrap</b>, you get an application with lightweight built-in sup
|
|
|
93
93
|
|
|
94
94
|
Interested? Let's jump right into it ⚡
|
|
95
95
|
|
|
96
|
+
## Table of contents
|
|
97
|
+
|
|
98
|
+
- [Installation](#installation)
|
|
99
|
+
- [Quickstart](#quickstart)
|
|
100
|
+
- [Settings](#settings)
|
|
101
|
+
- [Service settings](#service-settings)
|
|
102
|
+
- [Instruments](#instruments)
|
|
103
|
+
- [Sentry](#sentry)
|
|
104
|
+
- [Prometheus](#prometheus)
|
|
105
|
+
- [Opentelemetry](#opentelemetry)
|
|
106
|
+
- [Logging](#logging)
|
|
107
|
+
- [Cors](#cors)
|
|
108
|
+
- [Swagger](#swagger)
|
|
109
|
+
- [Configuration](#configuration)
|
|
110
|
+
- [Instruments configuration](#instruments-configuration)
|
|
111
|
+
- [Application configuration](#application-configuration)
|
|
112
|
+
- [Advanced](#advanced)
|
|
113
|
+
|
|
96
114
|
## Installation
|
|
97
115
|
|
|
98
116
|
You can install package with `pip` or `poetry`.
|
|
@@ -330,6 +348,32 @@ Parameters description:
|
|
|
330
348
|
- `logging_extra_processors` - set additional structlog processors if you have some.
|
|
331
349
|
- `logging_exclude_endpoints` - remove logging on certain endpoints.
|
|
332
350
|
|
|
351
|
+
### Cors
|
|
352
|
+
|
|
353
|
+
```python
|
|
354
|
+
from microbootstrap.bootstrappers.litestar import BaseBootstrapSettings
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
class YourSettings(BaseBootstrapSettings):
|
|
358
|
+
cors_allowed_origins: list[str] = pydantic.Field(default_factory=list)
|
|
359
|
+
cors_allowed_methods: list[str] = pydantic.Field(default_factory=list)
|
|
360
|
+
cors_allowed_headers: list[str] = pydantic.Field(default_factory=list)
|
|
361
|
+
cors_exposed_headers: list[str] = pydantic.Field(default_factory=list)
|
|
362
|
+
cors_allowed_credentials: bool = False
|
|
363
|
+
cors_allowed_origin_regex: str | None = None
|
|
364
|
+
cors_max_age: int = 600
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
Parameters description:
|
|
368
|
+
|
|
369
|
+
- `cors_allowed_origins` - list of origins that are allowed.
|
|
370
|
+
- `cors_allowed_methods` - list of allowed HTTP methods.
|
|
371
|
+
- `cors_allowed_headers` - list of allowed headers.
|
|
372
|
+
- `cors_exposed_headers` - list of headers that are exposed via the 'Access-Control-Expose-Headers' header.
|
|
373
|
+
- `cors_allowed_credentials` - boolean dictating whether or not to set the 'Access-Control-Allow-Credentials' header.
|
|
374
|
+
- `cors_allowed_origin_regex` - regex to match origins against.
|
|
375
|
+
- `cors_max_age` - response caching TTL in seconds, defaults to 600.
|
|
376
|
+
|
|
333
377
|
### Swagger
|
|
334
378
|
|
|
335
379
|
```python
|
|
@@ -357,32 +401,6 @@ Parameters description:
|
|
|
357
401
|
- `swagger_offline_docs` - makes swagger js bundles access offline, because service starts to host via static.
|
|
358
402
|
- `swagger_extra_params` - additional params to pass into openapi config.
|
|
359
403
|
|
|
360
|
-
### Cors
|
|
361
|
-
|
|
362
|
-
```python
|
|
363
|
-
from microbootstrap.bootstrappers.litestar import BaseBootstrapSettings
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
class YourSettings(BaseBootstrapSettings):
|
|
367
|
-
cors_allowed_origins: list[str] = pydantic.Field(default_factory=list)
|
|
368
|
-
cors_allowed_methods: list[str] = pydantic.Field(default_factory=list)
|
|
369
|
-
cors_allowed_headers: list[str] = pydantic.Field(default_factory=list)
|
|
370
|
-
cors_exposed_headers: list[str] = pydantic.Field(default_factory=list)
|
|
371
|
-
cors_allowed_credentials: bool = False
|
|
372
|
-
cors_allowed_origin_regex: str | None = None
|
|
373
|
-
cors_max_age: int = 600
|
|
374
|
-
```
|
|
375
|
-
|
|
376
|
-
Parameters description:
|
|
377
|
-
|
|
378
|
-
- `cors_allowed_origins` - list of origins that are allowed.
|
|
379
|
-
- `cors_allowed_methods` - list of allowed HTTP methods.
|
|
380
|
-
- `cors_allowed_headers` - list of allowed headers.
|
|
381
|
-
- `cors_exposed_headers` - list of headers that are exposed via the 'Access-Control-Expose-Headers' header.
|
|
382
|
-
- `cors_allowed_credentials` - boolean dictating whether or not to set the 'Access-Control-Allow-Credentials' header.
|
|
383
|
-
- `cors_allowed_origin_regex` - regex to match origins against.
|
|
384
|
-
- `cors_max_age` - response caching TTL in seconds, defaults to 600.
|
|
385
|
-
|
|
386
404
|
## Configuration
|
|
387
405
|
|
|
388
406
|
Despite settings being pretty convenient mechanism, it's not always possible to store everything in settings.
|
|
@@ -46,6 +46,24 @@ With <b>microbootstrap</b>, you get an application with lightweight built-in sup
|
|
|
46
46
|
|
|
47
47
|
Interested? Let's jump right into it ⚡
|
|
48
48
|
|
|
49
|
+
## Table of contents
|
|
50
|
+
|
|
51
|
+
- [Installation](#installation)
|
|
52
|
+
- [Quickstart](#quickstart)
|
|
53
|
+
- [Settings](#settings)
|
|
54
|
+
- [Service settings](#service-settings)
|
|
55
|
+
- [Instruments](#instruments)
|
|
56
|
+
- [Sentry](#sentry)
|
|
57
|
+
- [Prometheus](#prometheus)
|
|
58
|
+
- [Opentelemetry](#opentelemetry)
|
|
59
|
+
- [Logging](#logging)
|
|
60
|
+
- [Cors](#cors)
|
|
61
|
+
- [Swagger](#swagger)
|
|
62
|
+
- [Configuration](#configuration)
|
|
63
|
+
- [Instruments configuration](#instruments-configuration)
|
|
64
|
+
- [Application configuration](#application-configuration)
|
|
65
|
+
- [Advanced](#advanced)
|
|
66
|
+
|
|
49
67
|
## Installation
|
|
50
68
|
|
|
51
69
|
You can install package with `pip` or `poetry`.
|
|
@@ -283,6 +301,32 @@ Parameters description:
|
|
|
283
301
|
- `logging_extra_processors` - set additional structlog processors if you have some.
|
|
284
302
|
- `logging_exclude_endpoints` - remove logging on certain endpoints.
|
|
285
303
|
|
|
304
|
+
### Cors
|
|
305
|
+
|
|
306
|
+
```python
|
|
307
|
+
from microbootstrap.bootstrappers.litestar import BaseBootstrapSettings
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
class YourSettings(BaseBootstrapSettings):
|
|
311
|
+
cors_allowed_origins: list[str] = pydantic.Field(default_factory=list)
|
|
312
|
+
cors_allowed_methods: list[str] = pydantic.Field(default_factory=list)
|
|
313
|
+
cors_allowed_headers: list[str] = pydantic.Field(default_factory=list)
|
|
314
|
+
cors_exposed_headers: list[str] = pydantic.Field(default_factory=list)
|
|
315
|
+
cors_allowed_credentials: bool = False
|
|
316
|
+
cors_allowed_origin_regex: str | None = None
|
|
317
|
+
cors_max_age: int = 600
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
Parameters description:
|
|
321
|
+
|
|
322
|
+
- `cors_allowed_origins` - list of origins that are allowed.
|
|
323
|
+
- `cors_allowed_methods` - list of allowed HTTP methods.
|
|
324
|
+
- `cors_allowed_headers` - list of allowed headers.
|
|
325
|
+
- `cors_exposed_headers` - list of headers that are exposed via the 'Access-Control-Expose-Headers' header.
|
|
326
|
+
- `cors_allowed_credentials` - boolean dictating whether or not to set the 'Access-Control-Allow-Credentials' header.
|
|
327
|
+
- `cors_allowed_origin_regex` - regex to match origins against.
|
|
328
|
+
- `cors_max_age` - response caching TTL in seconds, defaults to 600.
|
|
329
|
+
|
|
286
330
|
### Swagger
|
|
287
331
|
|
|
288
332
|
```python
|
|
@@ -310,32 +354,6 @@ Parameters description:
|
|
|
310
354
|
- `swagger_offline_docs` - makes swagger js bundles access offline, because service starts to host via static.
|
|
311
355
|
- `swagger_extra_params` - additional params to pass into openapi config.
|
|
312
356
|
|
|
313
|
-
### Cors
|
|
314
|
-
|
|
315
|
-
```python
|
|
316
|
-
from microbootstrap.bootstrappers.litestar import BaseBootstrapSettings
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
class YourSettings(BaseBootstrapSettings):
|
|
320
|
-
cors_allowed_origins: list[str] = pydantic.Field(default_factory=list)
|
|
321
|
-
cors_allowed_methods: list[str] = pydantic.Field(default_factory=list)
|
|
322
|
-
cors_allowed_headers: list[str] = pydantic.Field(default_factory=list)
|
|
323
|
-
cors_exposed_headers: list[str] = pydantic.Field(default_factory=list)
|
|
324
|
-
cors_allowed_credentials: bool = False
|
|
325
|
-
cors_allowed_origin_regex: str | None = None
|
|
326
|
-
cors_max_age: int = 600
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
Parameters description:
|
|
330
|
-
|
|
331
|
-
- `cors_allowed_origins` - list of origins that are allowed.
|
|
332
|
-
- `cors_allowed_methods` - list of allowed HTTP methods.
|
|
333
|
-
- `cors_allowed_headers` - list of allowed headers.
|
|
334
|
-
- `cors_exposed_headers` - list of headers that are exposed via the 'Access-Control-Expose-Headers' header.
|
|
335
|
-
- `cors_allowed_credentials` - boolean dictating whether or not to set the 'Access-Control-Allow-Credentials' header.
|
|
336
|
-
- `cors_allowed_origin_regex` - regex to match origins against.
|
|
337
|
-
- `cors_max_age` - response caching TTL in seconds, defaults to 600.
|
|
338
|
-
|
|
339
357
|
## Configuration
|
|
340
358
|
|
|
341
359
|
Despite settings being pretty convenient mechanism, it's not always possible to store everything in settings.
|
|
@@ -26,7 +26,7 @@ classifiers = [
|
|
|
26
26
|
"Programming Language :: Python :: 3.11",
|
|
27
27
|
"Programming Language :: Python :: 3.12",
|
|
28
28
|
]
|
|
29
|
-
version = "0.2.
|
|
29
|
+
version = "0.2.1"
|
|
30
30
|
description = "Package for bootstrapping new micro-services"
|
|
31
31
|
authors = ["community-of-python"]
|
|
32
32
|
readme = "README.md"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/instruments/logging_instrument.py
RENAMED
|
File without changes
|
{microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/instruments/opentelemetry_instrument.py
RENAMED
|
File without changes
|
{microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/instruments/prometheus_instrument.py
RENAMED
|
File without changes
|
{microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/instruments/sentry_instrument.py
RENAMED
|
File without changes
|
{microbootstrap-0.2.0 → microbootstrap-0.2.1}/microbootstrap/instruments/swagger_instrument.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|