open-index/open-npm huggingface dataset:
npm package: @sdk-it/dart
Description: A Dart SDK generator that converts OpenAPI specifications into type-safe Dart client libraries.
Latest version: 0.42.0

# @sdk-it/dart

A Dart SDK generator that converts OpenAPI specifications into type-safe Dart client libraries.

## Description

This package generates Dart client code from OpenAPI specifications. The generated SDK includes:

- Dart classes for API models
- API client classes for each tag/group
- Request and response handling
- Type-safe method signatures

## Installation

Add the generated SDK to your Dart or Flutter project. The generator will create a `pubspec.yaml` with required dependencies (such as `http` and `mime`).

## Usage

<details>
<summary>Generate a Dart SDK (OpenStatus Example)</summary>

> **Note:** This uses the [OpenStatus](https://www.openstatus.dev/) public OpenAPI spec as an example.

```bash
npx @sdk-it/cli@latest dart \
  --spec https://api.openstatus.dev/v1/openapi \
  --output ./openstatus \
  --name OpenStatus \
  --mode full
```

This command creates a Dart package in the `./openstatus` directory.

</details>

### Add the SDK to Your Project

Add the generated SDK as a dependency in your `pubspec.yaml`:

```yaml
dependencies:
  openstatus_sdk:
    path: ./openstatus
```

Run `dart pub get` or `flutter pub get` to install dependencies.

### Create and Configure the Client

```dart
import 'package:openstatus_sdk/package.dart';

final openstatus = OpenStatus(Options(baseUrl: 'https://api.openstatus.dev/v1/'));
```

### Make an API Request

```dart
final status = await openstatus.statusReport.getStatusReport();
if (status != null) {
  print('Status: \\${status.summary}');
} else {
  print('Request failed');
}
```

### Format Generated Code

The generator can format the output using `dart format` automatically. You can also run it manually:

```bash
dart format ./openstatus
```

## Notes

- Supports OpenAPI 3.0 and 3.1 specifications.
- For advanced usage, see the [TypeScript package documentation](../typescript/README.md) for general SDK-IT concepts.
npm package: @sdk-it/python
Description: This package generates Python SDKs from OpenAPI specifications. The generated SDKs are type-safe, use Pydantic for data validation, and follow Python best practices.
Latest version: 0.42.0

# Python SDK Generator

This package generates Python SDKs from OpenAPI specifications. The generated SDKs are type-safe, use Pydantic for data validation, and follow Python best practices.

## Generated SDK Features

- **Type Safety**: Full type hints using Python's typing system
- **Data Validation**: Pydantic models for request/response validation
- **Async Support**: Fully async HTTP client using `httpx`
- **Error Handling**: Proper exception hierarchy for API errors
- **Documentation**: Auto-generated docstrings from OpenAPI descriptions

## Generated SDK Structure

```
├── requirements.txt          # Python dependencies
├── client.py                # Main client class
├── api/                     # API group clients
│   ├── __init__.py
│   ├── users_api.py
│   └── pets_api.py
├── models/                  # Data models
│   ├── __init__.py
│   ├── user.py
│   └── pet.py
├── inputs/                  # Request input models
│   ├── __init__.py
│   └── ...
├── outputs/                 # Response output models
│   ├── __init__.py
│   └── ...
└── http/                    # HTTP transport layer
    ├── __init__.py
    ├── dispatcher.py
    ├── interceptors.py
    └── responses.py
```

## Usage

```python
import asyncio
from your_sdk import Client

async def main():
    client = Client(base_url="https://api.example.com")

    # Make API calls
    users = await client.users.list_users()
    user = await client.users.get_user(user_id="123")

if __name__ == "__main__":
    asyncio.run(main())
```

## Dependencies

The generated SDK has minimal dependencies:

- `httpx` - Modern async HTTP client
- `pydantic` - Data validation and serialization
- `typing-extensions` - Enhanced type hints support
npm package: @sdk-it/typescript
Description: <p align="center">A type-safe SDK generator that converts OpenAPI specifications into TypeScript client.</p>
Latest version: 0.42.0

# @sdk-it/typescript

<p align="center">A type-safe SDK generator that converts OpenAPI specifications into TypeScript client.</p>

## Description

This package transforms OpenAPI specifications into

- a fully-typed TypeScript client
- that works in Node.js, browsers, and any JavaScript runtime
- with the ability to control the structure, style, and formatting of generated code

## Installation

```bash
npm install @sdk-it/typescript
```

## Usage

### Basic SDK Generation

```typescript
import { generate } from '@sdk-it/typescript';

import spec from './openapi.json';

await generate(spec, {
  output: './client',
  name: 'MyAPI',
});
```

### Remote Spec Example

```typescript
import { generate } from '@sdk-it/typescript';

// Fetch remote OpenAPI specification
const spec = await fetch('https://api.openstatus.dev/v1/openapi').then((res) =>
  res.json(),
);

// Generate client SDK
await generate(spec, {
  output: './client',
  name: 'OpenStatus',
});
```

### Format Generated Code

You can format the generated code using the `formatCode` option. Useful when committing generated code to source control.

```typescript
import { generate } from '@sdk-it/typescript';

const spec = await fetch('https://petstore.swagger.io/v2/swagger.json').then(
  (res) => res.json(),
);

// Format generated code using Prettier
await generate(spec, {
  output: join(process.cwd(), 'node_modules/.sdk-it/client'),
  formatCode: ({ output, env }) => {
    execFile('prettier', [output, '--write'], { env: env });
  },
});
```

### Run the script

```bash
# using recent versions of node
node ./openapi.ts

# using node < 22
npx tsx ./openapi.ts

# using bun
bun ./openapi.ts
```

- Use the generated SDK

```typescript
import { OpenStatus } from './client';

const client = new OpenStatus({
  baseUrl: 'https://api.openstatus.dev/v1/',
});

const [result, error] = await client.request('GET /status_report', {});
```

## Using with Your Favorite Frameworks

The SDK works on its own, but you might want native integration with your frameworks:

- [React Query](../../docs/react-query.md)
- [Angular](../../docs/angular.md)

Let us know what you're using, and we'll help you integrate it.