Skip to content

Commit

Permalink
docs: remove pragma comments (#1063)
Browse files Browse the repository at this point in the history
* docs: remove pragma comments

* docs: restore EmailStr.md

* restored deleted doc and updated citation file

---------

Co-authored-by: Davor Runje <[email protected]>
  • Loading branch information
Lancetnik and davorrunje authored Dec 15, 2023
1 parent 7cbf1f9 commit 3028e31
Show file tree
Hide file tree
Showing 11 changed files with 95 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"filename": "docs/docs/en/release.md",
"hashed_secret": "35675e68f4b5af7b995d9205ad0fc43842f16450",
"is_verified": false,
"line_number": 367,
"line_number": 391,
"is_secret": false
}
],
Expand Down Expand Up @@ -163,5 +163,5 @@
}
]
},
"generated_at": "2023-12-15T08:58:47Z"
"generated_at": "2023-12-15T19:16:46Z"
}
52 changes: 52 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,55 @@ authors:
city: Zagreb
email: [email protected]
website: 'https://airt.ai'
repository-code: 'https://github.com/airtai/faststream'
url: 'https://faststream.airt.ai/'
repository-artifact: 'https://pypistats.org/packages/faststream'
abstract: >
FastStream simplifies the process of writing producers and
consumers for message queues, handling all the parsing,
networking and documentation generation automatically.
Making streaming microservices has never been easier.
Designed with junior developers in mind, FastStream
simplifies your work while keeping the door open for more
advanced use cases. Here's a look at the core features
that make FastStream a go-to framework for modern,
data-centric microservices.
- Multiple Brokers: FastStream provides a unified API to
work across multiple message brokers (Apache Kafka,
RabbitMQ, NATS and Redis support)
- Pydantic Validation: Leverage Pydantic's validation
capabilities to serialize and validate incoming messages
- Automatic Docs: Stay ahead with automatic AsyncAPI
documentation
- Intuitive: Full-typed editor support makes your
development experience smooth, catching errors before they
reach runtime
- Powerful Dependency Injection System: Manage your
service dependencies efficiently with FastStream's
built-in DI system
- Testable: Supports in-memory tests, making your CI/CD
pipeline faster and more reliable
- Extensible: Use extensions for lifespans, custom
serialization and middleware
- Integrations: FastStream is fully compatible with any
HTTP framework you want (FastAPI especially)
keywords:
- python
- redis
- distributed-systems
- apache kafka
- rabbitmq
- nats
- stream-processing
- asyncio
- asyncapi
license: Apache-2.0
8 changes: 4 additions & 4 deletions docs/docs/en/kafka/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This chapter discusses the security options available in **FastStream** and how
**Usage:**

```python linenums="1"
{! docs_src/kafka/security/plaintext.py !}
{! docs_src/kafka/security/plaintext.py [ln:1-10.25,11-] !}
```

**Using any SASL authentication without SSL:**
Expand All @@ -47,7 +47,7 @@ The following example will log a **RuntimeWarning**:
If the user does not want to use SSL encryption without the waringning getting logged, they must explicitly set the `use_ssl` parameter to `False` when creating a SASL object.

```python linenums="1"
{! docs_src/kafka/security/ssl_warning.py [ln:12.5] !}
{! docs_src/kafka/security/ssl_warning.py [ln:12.5-12.72] !}
```

### 3. SASLScram256/512 Object with SSL/TLS
Expand All @@ -58,10 +58,10 @@ If the user does not want to use SSL encryption without the waringning getting l

=== "SCRAM256"
```python linenums="1"
{!> docs_src/kafka/security/sasl_scram256.py !}
{!> docs_src/kafka/security/sasl_scram256.py [ln:1-10.25,11-] !}
```

=== "SCRAM512"
```python linenums="1"
{!> docs_src/kafka/security/sasl_scram512.py !}
{!> docs_src/kafka/security/sasl_scram512.py [ln:1-10.25,11-] !}
```
2 changes: 1 addition & 1 deletion docs/docs/en/rabbit/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ This chapter discusses the security options available in **FastStream** and how
**Usage:**

```python linenums="1" hl_lines="6-11 13"
{! docs_src/rabbit/security/plaintext.py !}
{! docs_src/rabbit/security/plaintext.py [ln:1-10.25,11-] !}
```
2 changes: 1 addition & 1 deletion docs/docs/en/redis/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ This chapter discusses the security options available in **FastStream** and how
**Usage:**

```python linenums="1" hl_lines="6-11 13"
{! docs_src/redis/security/plaintext.py !}
{! docs_src/redis/security/plaintext.py [ln:1-10.25,11-] !}
```
26 changes: 25 additions & 1 deletion docs/docs/en/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,31 @@ hide:
---

# Release Notes
## 0.3.7

### What's Changed

* feat (#974): add FastAPI Context by [@Lancetnik](https://github.com/Lancetnik){.external-link target="_blank"} in [#1060](https://github.com/airtai/faststream/pull/1060){.external-link target="_blank"}
* chore: update pre-commit by [@davorrunje](https://github.com/davorrunje){.external-link target="_blank"} in [#1058](https://github.com/airtai/faststream/pull/1058){.external-link target="_blank"}

Support regular FastStream Context with FastAPI plugin

```python
from fastapi import FastAPI
from faststream.redis.fastapi import RedisRouter, Logger

router = RedisRouter()

@router.subscriber("test")
async def handler(msg, logger: Logger):
logger.info(msg)

app = FastAPI(lifespan=router.lifespan_context)
app.include_router(router)
```

**Full Changelog**: [#0.3.6...0.3.7](https://github.com/airtai/faststream/compare/0.3.6...0.3.7){.external-link target="_blank"}

## 0.3.6

### What's Changed
Expand Down Expand Up @@ -63,7 +88,6 @@ Provides with the ability to setup `graceful_timeout` to wait for consumed messa
* chore: updated release notes by [@davorrunje](https://github.com/davorrunje){.external-link target="_blank"} in [#1040](https://github.com/airtai/faststream/pull/1040){.external-link target="_blank"}
* chore: use Github App to generate token for release notes PR by [@kumaranvpl](https://github.com/kumaranvpl){.external-link target="_blank"} in [#1043](https://github.com/airtai/faststream/pull/1043){.external-link target="_blank"}


**Full Changelog**: [#0.3.3...0.3.4](https://github.com/airtai/faststream/compare/0.3.3...0.3.4){.external-link target="_blank"}

## 0.3.3
Expand Down
2 changes: 1 addition & 1 deletion docs/includes/getting_started/cli/env.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

=== "RabbitMQ"
```python linenums="1" hl_lines="14-16"
{!> docs_src/getting_started/cli/rabbit_context.py!}
{!> docs_src/getting_started/cli/rabbit_context.py [ln:1-10.53,11-] !}
```

=== "NATS"
Expand Down
8 changes: 4 additions & 4 deletions docs/includes/getting_started/context/custom_global_2.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
=== "Kafka"
```python linenums="1" hl_lines="4"
{!> docs_src/getting_started/context/kafka/custom_global_context.py [ln:8-13] !}
{!> docs_src/getting_started/context/kafka/custom_global_context.py [ln:8-13.44] !}
```

=== "RabbitMQ"
```python linenums="1" hl_lines="4"
{!> docs_src/getting_started/context/rabbit/custom_global_context.py [ln:8-13] !}
{!> docs_src/getting_started/context/rabbit/custom_global_context.py [ln:8-13.44] !}
```

=== "NATS"
```python linenums="1" hl_lines="4"
{!> docs_src/getting_started/context/nats/custom_global_context.py [ln:8-13] !}
{!> docs_src/getting_started/context/nats/custom_global_context.py [ln:8-13.44] !}
```

=== "Redis"
```python linenums="1" hl_lines="4"
{!> docs_src/getting_started/context/redis/custom_global_context.py [ln:8-13] !}
{!> docs_src/getting_started/context/redis/custom_global_context.py [ln:8-13.44] !}
```
2 changes: 1 addition & 1 deletion docs/includes/getting_started/lifespan/1.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

=== "RabbitMQ"
```python linenums="1" hl_lines="14-18"
{!> docs_src/getting_started/lifespan/rabbit/basic.py!}
{!> docs_src/getting_started/lifespan/rabbit/basic.py [ln:1-11.53,12-] !}
```

=== "NATS"
Expand Down
2 changes: 1 addition & 1 deletion docs/update_releases.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def convert_links_and_usernames(text):
text = re.sub(r"(https?://.*\/(.*))", r'[#\2](\1){.external-link target="_blank"}', text)

# Convert GitHub usernames to links
text = re.sub(r"@(\w+)", r'[@\1](https://github.com/\1){.external-link target="_blank"}', text)
text = re.sub(r"@(\w+) ", r'[@\1](https://github.com/\1){.external-link target="_blank"} ', text)


return text
Expand Down
6 changes: 3 additions & 3 deletions examples/fastapi_integration/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from fastapi import FastAPI

from faststream.rabbit.fastapi import RabbitRouter
from faststream.rabbit.fastapi import Logger, RabbitRouter

router = RabbitRouter("amqp://guest:guest@localhost:5672/")
app = FastAPI(lifespan=router.lifespan_context)
Expand All @@ -10,8 +10,8 @@

@publisher
@router.subscriber("test-q")
async def handler(user_id: int):
print(user_id)
async def handler(user_id: int, logger: Logger):
logger.info(user_id)
return f"{user_id} created"


Expand Down

0 comments on commit 3028e31

Please sign in to comment.