# API Reference

Dive into the specifics of each stream operation by checking out our complete documentation.

## Intermediate Operations

Intermediate operations are transformative and filtering operations applied to the elements of a Stream, enabling diverse data manipulations and facilitating the chaining of operations to construct intricate processing pipelines while maintaining the Stream's continuity.

{% content-ref url="/pages/IJlrFFhIyeiuqg9ZvzNo" %}
[Intermediate Operations](/reference/api-reference/intermediate-operations.md)
{% endcontent-ref %}

## Terminal Operations

A terminal operation is an operation that is performed on a stream and produces a result or a side effect. Terminal operations are the final step in a stream pipeline and trigger the processing of the elements in the stream.

When a terminal operation is invoked on a stream, it consumes the elements from the stream and produces a result, which could be a single value or a collection, or performs a side effect, such as writing to a file or displaying information on the console. Once a terminal operation is executed, the stream is considered consumed and cannot be reused.

If you try to reuse the stream, it will throw a `RuntimeError`.

{% content-ref url="/pages/C72EyJvS2l3m75a25pjq" %}
[Terminal Operations](/reference/api-reference/terminal-operations.md)
{% endcontent-ref %}

## Numeric Stream

`NumericStream` is a special Stream type that extends the default functionality with operations for numerical data sources such as statistical and mathematical functions.

{% content-ref url="/pages/HXvLmDuX1EzGYV15uXrk" %}
[Numeric Stream](/reference/api-reference/numeric-stream.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pystreamapi.pickwicksoft.org/reference/api-reference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
