# Dify-OAPI
[](https://badge.fury.io/py/dify-oapi2)
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
A modern Python SDK for interacting with the Dify Service-API. This library provides a fluent, type-safe interface for building AI-powered applications using Dify's comprehensive API services including chat, completion, knowledge base, workflow, and chatflow features.
> This project is based on https://github.com/QiMington/dify-oapi, completely refactored with modern Python practices and full support for the latest Dify API.
## ✨ Features
- **Complete API Coverage**: Chat (18 APIs), Chatflow (15 APIs), Completion (10 APIs), Knowledge Base (33 APIs), Workflow (4 APIs), and Core Dify (9 APIs)
- **Builder Pattern**: Fluent, chainable interface for constructing requests
- **Sync & Async Support**: Both synchronous and asynchronous operations
- **Streaming Responses**: Real-time streaming for chat and completion
- **Type Safety**: Comprehensive type hints with Pydantic 2.x validation
- **File Upload**: Support for images and documents
- **Modern HTTP Client**: Built on httpx for reliable API communication
- **Connection Pool Optimization**: Efficient TCP connection reuse to reduce resource overhead
## 📦 Installation
```bash
pip install dify-oapi2
```
**Requirements**: Python 3.10+
**Core Dependencies**:
- `pydantic` (^2) - Data validation and settings management with type safety
- `httpx` (^0) - Modern async HTTP client
**Development Dependencies**:
- `ruff` (^0) - Fast Python linter and formatter
- `mypy` (^1) - Static type checking
- `pytest` (^8) - Testing framework
- `pre-commit` (^4) - Git hooks for code quality
- `commitizen` (^4) - Semantic versioning and changelog generation
- `poetry` - Dependency management and packaging
## 🛠️ Technology Stack
- **Language**: Python 3.10+
- **HTTP Client**: httpx with connection pooling optimization
- **Type System**: Pydantic 2.x with comprehensive type validation
- **Architecture**: Builder pattern with fluent API design + Service layer pattern
- **Async Support**: Full async/await support with AsyncGenerator streaming
- **Code Quality**: Ruff (linting + formatting) + MyPy (type checking)
- **Testing**: pytest with async support and comprehensive coverage
- **Packaging**: Poetry with modern Python packaging standards
- **Total Coverage**: 89 API methods across 6 services with complete examples
## 🚀 Quick Start
### Basic Usage
```python
from dify_oapi.client import Client
from dify_oapi.core.model.request_option import RequestOption
from dify_oapi.api.chat.v1.model.chat_request import ChatRequest
# Initialize client with builder pattern
client = (
Client.builder()
.domain("https://api.dify.ai")
.max_connections(100)
.keepalive_expiry(30.0)
.build()
)
# Create request options
req_option = RequestOption.builder().api_key("your-api-key").build()
# Use the chat API
response = client.chat.chat(
request=ChatRequest.builder()
.query("Hello, how are you?")
.user("user-123")
.build(),
request_option=req_option
)
print(response.answer)
```
### Comprehensive Examples
Ready to build AI-powered applications? Check out our comprehensive examples:
- **[Chat Examples](./examples/chat/)** - Interactive conversations and streaming responses
- **[Chatflow Examples](./examples/chatflow/)** - Enhanced chat with workflow events
- **[Knowledge Base Examples](./examples/knowledge/)** - Build and query knowledge bases
- **[Workflow Examples](./examples/workflow/)** - Automate complex AI workflows
- **[Complete Examples Collection](./examples/)** - All API services with detailed usage patterns
Each example includes complete, runnable code with detailed explanations.
## 🔧 API Services
### Chat API (18 APIs)
**Resources**: annotation (6), chat (3), conversation (6), message (3)
- **Interactive Chat**: Send messages with blocking/streaming responses
- **Conversation Management**: Complete conversation lifecycle operations
- **Annotation System**: Create, update, delete annotations with reply settings
- **Message Operations**: Basic message handling and history retrieval
- **Streaming Support**: Real-time streaming for chat responses
- **Type Safety**: Comprehensive type hints with strict Literal types
### Chatflow API (15 APIs)
**Resources**: annotation (6), chatflow (3), conversation (6)
- **Enhanced Chat**: Advanced chat functionality with workflow events
- **Conversation Management**: Complete conversation operations with variables
- **Annotation System**: Full annotation management and reply configuration
- **Workflow Integration**: Seamless integration with workflow events
- **Event Streaming**: Real-time streaming with comprehensive event handling
- **Type Safety**: Strict Literal types for all predefined values
### Completion API (10 APIs)
**Resources**: annotation (6), completion (4)
- **Text Generation**: Advanced text completion and generation
- **Message Processing**: Send messages and control text generation
- **Annotation Management**: Create, update, and manage annotations
- **Generation Control**: Stop ongoing text generation processes
- **Streaming Support**: Real-time text generation with streaming responses
- **Type Safety**: Full type validation with Pydantic models
### Knowledge Base API (33 APIs)
**Resources**: chunk (4), dataset (6), document (10), model (1), segment (5), tag (7)
- **Dataset Management**: Complete dataset CRUD operations and content retrieval
- **Document Processing**: File upload, text processing, and batch management
- **Content Organization**: Fine-grained segmentation and chunk management
- **Tag System**: Flexible tagging and categorization system
- **Model Integration**: Embedding model information and configuration
- **Search & Retrieval**: Advanced search with multiple retrieval strategies
### Workflow API (4 APIs)
**Resources**: workflow (4)
- **Workflow Execution**: Run workflows with blocking or streaming responses
- **Execution Control**: Stop running workflows and monitor progress
- **Log Management**: Retrieve detailed execution logs and run details
- **Parameter Support**: Flexible workflow parameter configuration
### Dify Core API (9 APIs)
**Resources**: audio (2), feedback (2), file (1), info (4)
- **Audio Processing**: Speech-to-text and text-to-speech conversion
- **Feedback System**: Submit and retrieve user feedback
- **File Management**: Unified file upload and processing
- **Application Info**: App configuration, parameters, and metadata access
## 💡 Examples
Explore comprehensive examples in the [examples directory](./examples):
### Chat Examples
- [**Chat Messages**](./examples/chat/chat/) - Send messages, stop generation, get suggestions
- [**Conversation Management**](./examples/chat/conversation/) - Complete conversation operations
- [**Message Operations**](./examples/chat/message/) - Basic message operations
- [**Annotation Management**](./examples/chat/annotation/) - Annotation CRUD and reply settings
*Note: File upload and feedback examples are available in [Dify Core API](./examples/dify/) as shared services.*
### Completion Examples
- [**Completion Operations**](./examples/completion/completion/) - Text generation and completion
- [**Annotation Management**](./examples/completion/annotation/) - Annotation operations
### Knowledge Base Examples
- [**Dataset Management**](./examples/knowledge/dataset/) - Complete dataset operations
- [**Document Processing**](./examples/knowledge/document/) - File upload and text processing
- [**Content Organization**](./examples/knowledge/segment/) - Segment and chunk management
- [**Tag Management**](./examples/knowledge/tag/) - Metadata and tagging system
### Chatflow Examples
- [**Advanced Chat**](./examples/chatflow/chatflow/) - Enhanced chat with streaming and workflow events
- [**Conversation Management**](./examples/chatflow/conversation/) - Complete conversation operations
- [**Annotation Management**](./examples/chatflow/annotation/) - Annotation CRUD and reply settings
### Dify Core Examples
- [**Audio Processing**](./examples/dify/audio/) - Speech-to-text and text-to-speech
- [**Feedback Management**](./examples/dify/feedback/) - User feedback collection
- [**File Management**](./examples/dify/file/) - File upload and processing
- [**Application Info**](./examples/dify/info/) - App configuration and metadata
### Workflow Examples
- [**Workflow Operations**](./examples/workflow/workflow/) - Workflow execution and management
- [**File Upload**](./examples/workflow/file/) - File upload for workflows
For detailed examples and usage patterns, see the [examples README](./examples/README.md).
## 🛠️ Development
### Prerequisites
- Python 3.10+
- Poetry (for dependency management)
- Git (for version control)
### Setup
```bash
# Clone repository
git clone https://github.com/nodite/dify-oapi2.git
cd dify-oapi2
# Setup development environment (installs dependencies and pre-commit hooks)
make dev-setup
```
### Code Quality Tools
This project uses modern Python tooling for code quality:
- **Ruff**: Fast Python linter and formatter (replaces Black + isort + flake8)
- **MyPy**: Static type checking for type safety
- **Pre-commit**: Git hooks for automated code quality checks
- **Poetry**: Modern dependency management and packaging
```bash
# Format code
make format
# Lint code
make lint
# Fix linting issues
make fix
# Run all checks (lint + type check)
make check
# Install pre-commit hooks
make install-hooks
# Run pre-commit hooks manually
make pre-commit
```
### Testing
```bash
# Set environment variables for integration tests
export DOMAIN="https://api.dify.ai"
export CHAT_KEY="your-chat-api-key"
export CHATFLOW_KEY="your-chatflow-api-key"
export COMPLETION_KEY="your-completion-api-key"
export DIFY_KEY="your-dify-api-key"
export WORKFLOW_KEY="your-workflow-api-key"
export KNOWLEDGE_KEY="your-knowledge-api-key"
# Run tests
make test
# Run tests with coverage
make test-cov
# Run specific test module
poetry run pytest tests/knowledge/ -v
```
### Build & Publish
```bash
# Configure PyPI tokens (one-time setup)
poetry config http-basic.testpypi __token__ <your-testpypi-token>
poetry config http-basic.pypi __token__ <your-pypi-token>
# Build package
make build
# Publish to TestPyPI (for testing)
make publish-test
# Publish to PyPI (maintainers only)
make publish
```
### Project Structure
```
dify-oapi2/
├── dify_oapi/ # Main SDK package
│ ├── api/ # API service modules
│ │ ├── chat/ # Chat API (18 APIs)
│ │ │ └── v1/ # Version 1 implementation
│ │ ├── chatflow/ # Chatflow API (15 APIs)
│ │ │ └── v1/ # Version 1 implementation
│ │ ├── completion/ # Completion API (10 APIs)
│ │ │ └── v1/ # Version 1 implementation
│ │ ├── dify/ # Core Dify API (9 APIs)
│ │ │ └── v1/ # Version 1 implementation
│ │ ├── knowledge/ # Knowledge Base API (33 APIs)
│ │ │ └── v1/ # Version 1 implementation
│ │ └── workflow/ # Workflow API (6 APIs)
│ │ └── v1/ # Version 1 implementation
│ ├── core/ # Core functionality
│ │ ├── http/ # HTTP transport layer with connection pooling
│ │ ├── model/ # Base models and configurations
│ │ └── utils/ # Utility functions
│ └── client.py # Main client interface with builder pattern
├── docs/ # Comprehensive documentation
├── examples/ # Complete usage examples for all APIs
├── tests/ # Comprehensive test suite
├── pyproject.toml # Project configuration (Poetry + tools)
├── Makefile # Development automation
└── DEVELOPMENT.md # Development guide
```
## 📖 Documentation
- [**Development Guide**](./DEVELOPMENT.md) - Setup, workflow, and contribution guidelines
- [**Project Overview**](./docs/overview.md) - Architecture and technical details
- [**API Documentation**](./docs/) - Complete API documentation by service
- [**Examples**](./examples/README.md) - Comprehensive usage examples and patterns
## 🤝 Contributing
Contributions are welcome! Please follow our development workflow:
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Make your changes with comprehensive tests
4. Ensure code quality passes (`make check`)
5. Run the full test suite (`make test`)
6. Commit your changes (`git commit -m 'Add amazing feature'`)
7. Push to the branch (`git push origin feature/amazing-feature`)
8. Submit a pull request
See [DEVELOPMENT.md](./DEVELOPMENT.md) for detailed development guidelines.
## 📄 License
This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.
## 🔗 Links
- **PyPI Package**: https://pypi.org/project/dify-oapi2/
- **Source Code**: https://github.com/nodite/dify-oapi2
- **Dify Platform**: https://dify.ai/
- **Dify API Docs**: https://docs.dify.ai/
---
**Keywords**: dify, ai, nlp, language-processing, python-sdk, async, type-safe, api-client
Raw data
{
"_id": null,
"home_page": "https://github.com/nodite/dify-oapi2",
"name": "dify-oapi2",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "dify, nlp, ai, language-processing",
"author": "Oscaner Miao",
"author_email": "oscaner1997@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/9b/67/169ef5a3a1a993fffc8d8600507a9e67460568a1af73360b10b24e73689d/dify_oapi2-1.0.1.tar.gz",
"platform": null,
"description": "# Dify-OAPI\n\n[](https://badge.fury.io/py/dify-oapi2)\n[](https://www.python.org/downloads/)\n[](https://opensource.org/licenses/MIT)\n\nA modern Python SDK for interacting with the Dify Service-API. This library provides a fluent, type-safe interface for building AI-powered applications using Dify's comprehensive API services including chat, completion, knowledge base, workflow, and chatflow features.\n\n> This project is based on https://github.com/QiMington/dify-oapi, completely refactored with modern Python practices and full support for the latest Dify API.\n\n## \u2728 Features\n\n- **Complete API Coverage**: Chat (18 APIs), Chatflow (15 APIs), Completion (10 APIs), Knowledge Base (33 APIs), Workflow (4 APIs), and Core Dify (9 APIs)\n- **Builder Pattern**: Fluent, chainable interface for constructing requests\n- **Sync & Async Support**: Both synchronous and asynchronous operations\n- **Streaming Responses**: Real-time streaming for chat and completion\n- **Type Safety**: Comprehensive type hints with Pydantic 2.x validation\n- **File Upload**: Support for images and documents\n- **Modern HTTP Client**: Built on httpx for reliable API communication\n- **Connection Pool Optimization**: Efficient TCP connection reuse to reduce resource overhead\n\n## \ud83d\udce6 Installation\n\n```bash\npip install dify-oapi2\n```\n\n**Requirements**: Python 3.10+\n\n**Core Dependencies**:\n- `pydantic` (^2) - Data validation and settings management with type safety\n- `httpx` (^0) - Modern async HTTP client\n\n**Development Dependencies**:\n- `ruff` (^0) - Fast Python linter and formatter\n- `mypy` (^1) - Static type checking\n- `pytest` (^8) - Testing framework\n- `pre-commit` (^4) - Git hooks for code quality\n- `commitizen` (^4) - Semantic versioning and changelog generation\n- `poetry` - Dependency management and packaging\n\n## \ud83d\udee0\ufe0f Technology Stack\n\n- **Language**: Python 3.10+\n- **HTTP Client**: httpx with connection pooling optimization\n- **Type System**: Pydantic 2.x with comprehensive type validation\n- **Architecture**: Builder pattern with fluent API design + Service layer pattern\n- **Async Support**: Full async/await support with AsyncGenerator streaming\n- **Code Quality**: Ruff (linting + formatting) + MyPy (type checking)\n- **Testing**: pytest with async support and comprehensive coverage\n- **Packaging**: Poetry with modern Python packaging standards\n- **Total Coverage**: 89 API methods across 6 services with complete examples\n\n## \ud83d\ude80 Quick Start\n\n### Basic Usage\n\n```python\nfrom dify_oapi.client import Client\nfrom dify_oapi.core.model.request_option import RequestOption\nfrom dify_oapi.api.chat.v1.model.chat_request import ChatRequest\n\n# Initialize client with builder pattern\nclient = (\n Client.builder()\n .domain(\"https://api.dify.ai\")\n .max_connections(100)\n .keepalive_expiry(30.0)\n .build()\n)\n\n# Create request options\nreq_option = RequestOption.builder().api_key(\"your-api-key\").build()\n\n# Use the chat API\nresponse = client.chat.chat(\n request=ChatRequest.builder()\n .query(\"Hello, how are you?\")\n .user(\"user-123\")\n .build(),\n request_option=req_option\n)\n\nprint(response.answer)\n```\n\n### Comprehensive Examples\n\nReady to build AI-powered applications? Check out our comprehensive examples:\n\n- **[Chat Examples](./examples/chat/)** - Interactive conversations and streaming responses\n- **[Chatflow Examples](./examples/chatflow/)** - Enhanced chat with workflow events\n- **[Knowledge Base Examples](./examples/knowledge/)** - Build and query knowledge bases\n- **[Workflow Examples](./examples/workflow/)** - Automate complex AI workflows\n- **[Complete Examples Collection](./examples/)** - All API services with detailed usage patterns\n\nEach example includes complete, runnable code with detailed explanations.\n\n## \ud83d\udd27 API Services\n\n### Chat API (18 APIs)\n**Resources**: annotation (6), chat (3), conversation (6), message (3)\n- **Interactive Chat**: Send messages with blocking/streaming responses\n- **Conversation Management**: Complete conversation lifecycle operations\n- **Annotation System**: Create, update, delete annotations with reply settings\n- **Message Operations**: Basic message handling and history retrieval\n- **Streaming Support**: Real-time streaming for chat responses\n- **Type Safety**: Comprehensive type hints with strict Literal types\n\n### Chatflow API (15 APIs)\n**Resources**: annotation (6), chatflow (3), conversation (6)\n- **Enhanced Chat**: Advanced chat functionality with workflow events\n- **Conversation Management**: Complete conversation operations with variables\n- **Annotation System**: Full annotation management and reply configuration\n- **Workflow Integration**: Seamless integration with workflow events\n- **Event Streaming**: Real-time streaming with comprehensive event handling\n- **Type Safety**: Strict Literal types for all predefined values\n\n### Completion API (10 APIs)\n**Resources**: annotation (6), completion (4)\n- **Text Generation**: Advanced text completion and generation\n- **Message Processing**: Send messages and control text generation\n- **Annotation Management**: Create, update, and manage annotations\n- **Generation Control**: Stop ongoing text generation processes\n- **Streaming Support**: Real-time text generation with streaming responses\n- **Type Safety**: Full type validation with Pydantic models\n\n### Knowledge Base API (33 APIs)\n**Resources**: chunk (4), dataset (6), document (10), model (1), segment (5), tag (7)\n- **Dataset Management**: Complete dataset CRUD operations and content retrieval\n- **Document Processing**: File upload, text processing, and batch management\n- **Content Organization**: Fine-grained segmentation and chunk management\n- **Tag System**: Flexible tagging and categorization system\n- **Model Integration**: Embedding model information and configuration\n- **Search & Retrieval**: Advanced search with multiple retrieval strategies\n\n### Workflow API (4 APIs)\n**Resources**: workflow (4)\n- **Workflow Execution**: Run workflows with blocking or streaming responses\n- **Execution Control**: Stop running workflows and monitor progress\n- **Log Management**: Retrieve detailed execution logs and run details\n- **Parameter Support**: Flexible workflow parameter configuration\n\n### Dify Core API (9 APIs)\n**Resources**: audio (2), feedback (2), file (1), info (4)\n- **Audio Processing**: Speech-to-text and text-to-speech conversion\n- **Feedback System**: Submit and retrieve user feedback\n- **File Management**: Unified file upload and processing\n- **Application Info**: App configuration, parameters, and metadata access\n\n## \ud83d\udca1 Examples\n\nExplore comprehensive examples in the [examples directory](./examples):\n\n### Chat Examples\n- [**Chat Messages**](./examples/chat/chat/) - Send messages, stop generation, get suggestions\n- [**Conversation Management**](./examples/chat/conversation/) - Complete conversation operations\n- [**Message Operations**](./examples/chat/message/) - Basic message operations\n- [**Annotation Management**](./examples/chat/annotation/) - Annotation CRUD and reply settings\n\n*Note: File upload and feedback examples are available in [Dify Core API](./examples/dify/) as shared services.*\n\n### Completion Examples\n- [**Completion Operations**](./examples/completion/completion/) - Text generation and completion\n- [**Annotation Management**](./examples/completion/annotation/) - Annotation operations\n\n### Knowledge Base Examples\n- [**Dataset Management**](./examples/knowledge/dataset/) - Complete dataset operations\n- [**Document Processing**](./examples/knowledge/document/) - File upload and text processing\n- [**Content Organization**](./examples/knowledge/segment/) - Segment and chunk management\n- [**Tag Management**](./examples/knowledge/tag/) - Metadata and tagging system\n\n### Chatflow Examples\n- [**Advanced Chat**](./examples/chatflow/chatflow/) - Enhanced chat with streaming and workflow events\n- [**Conversation Management**](./examples/chatflow/conversation/) - Complete conversation operations\n- [**Annotation Management**](./examples/chatflow/annotation/) - Annotation CRUD and reply settings\n\n### Dify Core Examples\n- [**Audio Processing**](./examples/dify/audio/) - Speech-to-text and text-to-speech\n- [**Feedback Management**](./examples/dify/feedback/) - User feedback collection\n- [**File Management**](./examples/dify/file/) - File upload and processing\n- [**Application Info**](./examples/dify/info/) - App configuration and metadata\n\n### Workflow Examples\n- [**Workflow Operations**](./examples/workflow/workflow/) - Workflow execution and management\n- [**File Upload**](./examples/workflow/file/) - File upload for workflows\n\nFor detailed examples and usage patterns, see the [examples README](./examples/README.md).\n\n## \ud83d\udee0\ufe0f Development\n\n### Prerequisites\n- Python 3.10+\n- Poetry (for dependency management)\n- Git (for version control)\n\n### Setup\n\n```bash\n# Clone repository\ngit clone https://github.com/nodite/dify-oapi2.git\ncd dify-oapi2\n\n# Setup development environment (installs dependencies and pre-commit hooks)\nmake dev-setup\n```\n\n### Code Quality Tools\n\nThis project uses modern Python tooling for code quality:\n\n- **Ruff**: Fast Python linter and formatter (replaces Black + isort + flake8)\n- **MyPy**: Static type checking for type safety\n- **Pre-commit**: Git hooks for automated code quality checks\n- **Poetry**: Modern dependency management and packaging\n\n```bash\n# Format code\nmake format\n\n# Lint code\nmake lint\n\n# Fix linting issues\nmake fix\n\n# Run all checks (lint + type check)\nmake check\n\n# Install pre-commit hooks\nmake install-hooks\n\n# Run pre-commit hooks manually\nmake pre-commit\n```\n\n### Testing\n\n```bash\n# Set environment variables for integration tests\nexport DOMAIN=\"https://api.dify.ai\"\nexport CHAT_KEY=\"your-chat-api-key\"\nexport CHATFLOW_KEY=\"your-chatflow-api-key\"\nexport COMPLETION_KEY=\"your-completion-api-key\"\nexport DIFY_KEY=\"your-dify-api-key\"\nexport WORKFLOW_KEY=\"your-workflow-api-key\"\nexport KNOWLEDGE_KEY=\"your-knowledge-api-key\"\n\n# Run tests\nmake test\n\n# Run tests with coverage\nmake test-cov\n\n# Run specific test module\npoetry run pytest tests/knowledge/ -v\n```\n\n### Build & Publish\n\n```bash\n# Configure PyPI tokens (one-time setup)\npoetry config http-basic.testpypi __token__ <your-testpypi-token>\npoetry config http-basic.pypi __token__ <your-pypi-token>\n\n# Build package\nmake build\n\n# Publish to TestPyPI (for testing)\nmake publish-test\n\n# Publish to PyPI (maintainers only)\nmake publish\n```\n\n### Project Structure\n\n```\ndify-oapi2/\n\u251c\u2500\u2500 dify_oapi/ # Main SDK package\n\u2502 \u251c\u2500\u2500 api/ # API service modules\n\u2502 \u2502 \u251c\u2500\u2500 chat/ # Chat API (18 APIs)\n\u2502 \u2502 \u2502 \u2514\u2500\u2500 v1/ # Version 1 implementation\n\u2502 \u2502 \u251c\u2500\u2500 chatflow/ # Chatflow API (15 APIs)\n\u2502 \u2502 \u2502 \u2514\u2500\u2500 v1/ # Version 1 implementation\n\u2502 \u2502 \u251c\u2500\u2500 completion/ # Completion API (10 APIs)\n\u2502 \u2502 \u2502 \u2514\u2500\u2500 v1/ # Version 1 implementation\n\u2502 \u2502 \u251c\u2500\u2500 dify/ # Core Dify API (9 APIs)\n\u2502 \u2502 \u2502 \u2514\u2500\u2500 v1/ # Version 1 implementation\n\u2502 \u2502 \u251c\u2500\u2500 knowledge/ # Knowledge Base API (33 APIs)\n\u2502 \u2502 \u2502 \u2514\u2500\u2500 v1/ # Version 1 implementation\n\u2502 \u2502 \u2514\u2500\u2500 workflow/ # Workflow API (6 APIs)\n\u2502 \u2502 \u2514\u2500\u2500 v1/ # Version 1 implementation\n\u2502 \u251c\u2500\u2500 core/ # Core functionality\n\u2502 \u2502 \u251c\u2500\u2500 http/ # HTTP transport layer with connection pooling\n\u2502 \u2502 \u251c\u2500\u2500 model/ # Base models and configurations\n\u2502 \u2502 \u2514\u2500\u2500 utils/ # Utility functions\n\u2502 \u2514\u2500\u2500 client.py # Main client interface with builder pattern\n\u251c\u2500\u2500 docs/ # Comprehensive documentation\n\u251c\u2500\u2500 examples/ # Complete usage examples for all APIs\n\u251c\u2500\u2500 tests/ # Comprehensive test suite\n\u251c\u2500\u2500 pyproject.toml # Project configuration (Poetry + tools)\n\u251c\u2500\u2500 Makefile # Development automation\n\u2514\u2500\u2500 DEVELOPMENT.md # Development guide\n```\n\n## \ud83d\udcd6 Documentation\n\n- [**Development Guide**](./DEVELOPMENT.md) - Setup, workflow, and contribution guidelines\n- [**Project Overview**](./docs/overview.md) - Architecture and technical details\n- [**API Documentation**](./docs/) - Complete API documentation by service\n- [**Examples**](./examples/README.md) - Comprehensive usage examples and patterns\n\n\n## \ud83e\udd1d Contributing\n\nContributions are welcome! Please follow our development workflow:\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Make your changes with comprehensive tests\n4. Ensure code quality passes (`make check`)\n5. Run the full test suite (`make test`)\n6. Commit your changes (`git commit -m 'Add amazing feature'`)\n7. Push to the branch (`git push origin feature/amazing-feature`)\n8. Submit a pull request\n\nSee [DEVELOPMENT.md](./DEVELOPMENT.md) for detailed development guidelines.\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.\n\n## \ud83d\udd17 Links\n\n- **PyPI Package**: https://pypi.org/project/dify-oapi2/\n- **Source Code**: https://github.com/nodite/dify-oapi2\n- **Dify Platform**: https://dify.ai/\n- **Dify API Docs**: https://docs.dify.ai/\n\n---\n\n**Keywords**: dify, ai, nlp, language-processing, python-sdk, async, type-safe, api-client\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A package for interacting with the Dify Service-API",
"version": "1.0.1",
"project_urls": {
"Homepage": "https://github.com/nodite/dify-oapi2",
"Source": "https://github.com/nodite/dify-oapi2"
},
"split_keywords": [
"dify",
" nlp",
" ai",
" language-processing"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5d315396d047609cfeaaa8b2dde72e71b5591e5bab4ee6f074946eff6f4127d1",
"md5": "6daa021741bb6379f88a677cbada809b",
"sha256": "b09045073a4417235e6e48b12921730a788b1ec7b4c4f7be84156f5e8f07ab05"
},
"downloads": -1,
"filename": "dify_oapi2-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6daa021741bb6379f88a677cbada809b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 238641,
"upload_time": "2025-10-10T07:37:35",
"upload_time_iso_8601": "2025-10-10T07:37:35.041110Z",
"url": "https://files.pythonhosted.org/packages/5d/31/5396d047609cfeaaa8b2dde72e71b5591e5bab4ee6f074946eff6f4127d1/dify_oapi2-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9b67169ef5a3a1a993fffc8d8600507a9e67460568a1af73360b10b24e73689d",
"md5": "6a322bda2b3ca0bd025867202f989cd0",
"sha256": "18de38ba68acd6bc4aad14d7ee8bff09463f50f0b3988e7273275299f53dc5f5"
},
"downloads": -1,
"filename": "dify_oapi2-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "6a322bda2b3ca0bd025867202f989cd0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 92264,
"upload_time": "2025-10-10T07:37:36",
"upload_time_iso_8601": "2025-10-10T07:37:36.511403Z",
"url": "https://files.pythonhosted.org/packages/9b/67/169ef5a3a1a993fffc8d8600507a9e67460568a1af73360b10b24e73689d/dify_oapi2-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-10 07:37:36",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nodite",
"github_project": "dify-oapi2",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "dify-oapi2"
}