CouchDB OpenAPI scheme generator
Project description
๐ CouchDB OpenAPI Scheme Generator
OpenAPI specification generator for CouchDB - Perfect for developing and debugging applications using CouchDB as a backend
๐ Table of Contents
- ๐ CouchDB OpenAPI Scheme Generator
โจ Features
| Feature | Description | Status |
|---|---|---|
| ๐ณ Docker Support | Quick CouchDB deployment with Docker Compose | โ Ready |
| ๐ OpenAPI 3.0 | Modern OpenAPI specification generator | โ Ready |
| ๐ง CLI Tool | Easy-to-use command-line interface | โ Ready |
| ๐ JSON/YAML | Support for both JSON and YAML output formats | โ Ready |
| ๐ Authentication | Built-in support for CouchDB authentication | โ Ready |
| โก Fast Setup | Get started in minutes | โ Ready |
๐ฏ Description
This project has been updated for more convenient work with CouchDB and includes:
- ๐ณ Updated Docker Compose configuration for quick CouchDB deployment
- ๐ Modern OpenAPI specification generator for CouchDB API
- ๐ ๏ธ Utilities and tools for interacting with the CouchDB server
- ๐ Production-ready setup with best practices
๐ฆ Requirements
- ๐ Python 3.11 or higher
- ๐ณ Docker and Docker Compose
- ๐ฆ uv (Python package manager)
๐ Quick Start
# 1. Clone the repository
git clone https://github.com/SasukeSagara/CouchDB-OpenAPI-scheme-generator.git
cd couchdb-openapi-scheme-generator
# 2. Install dependencies
uv sync
# 3. Start CouchDB
docker-compose up -d
# 4. Generate OpenAPI specification
uv run openapi_generator.py
That's it! ๐ Your OpenAPI specification will be generated in couchdb-openapi.json
๐ป Installation
Step 1: Clone the repository
git clone https://github.com/SasukeSagara/CouchDB-OpenAPI-scheme-generator.git
cd couchdb-openapi-scheme-generator
Step 2: Install dependencies
Install dependencies using uv:
uv sync
For development dependencies:
uv sync --dev
๐ Usage
๐ณ Starting CouchDB
Start CouchDB using Docker Compose:
docker-compose up -d
CouchDB will be available at http://localhost:5984
โ ๏ธ Important: Change the password in
.envbefore using in production!
๐ Generating OpenAPI Specification
Use openapi_generator.py to generate the OpenAPI specification for CouchDB API:
Basic Usage
# Basic usage (local server)
uv run openapi_generator.py
Advanced Usage
# With URL and credentials specified
uv run openapi_generator.py \
--url http://localhost:5984 \
--username admin \
--password your_password
# With custom output file
uv run openapi_generator.py --output couchdb-api.json
# Generate in YAML format
uv run openapi_generator.py \
--format yaml \
--output couchdb-api.yaml
# Full example with all options
uv run openapi_generator.py \
--url http://localhost:5984 \
--username admin \
--password your_password \
--format json \
--output my-couchdb-api.json
๐ Parameters
| Parameter | Short | Description | Default |
|---|---|---|---|
--url |
-u |
CouchDB server URL | http://localhost:5984 |
--username |
- | Username for authentication | - |
--password |
- | Password for authentication | - |
--output |
-o |
Output file name | couchdb-openapi.json |
--format |
-f |
Output format (json or yaml) |
json |
๐ฎ Running the Main Application
uv run genopenapi_generatorerator.py
๐๏ธ Project Structure
CouchDB-OpenAPI-scheme-generator/
โโโ ๐ couchdb-data/ # CouchDB data (Docker volume)
โโโ ๐ couchdb-etc/ # CouchDB configuration
โโโ ๐ docker-compose.yml # Docker Compose configuration
โโโ ๐ main.py # Main application file
โโโ ๐ openapi_generator.py # OpenAPI specification generator
โโโ ๐ pyproject.toml # Python project configuration
โโโ ๐ uv.lock # Dependency lock file
โโโ ๐ .env # Environment variables (create this)
โโโ ๐ .gitignore # Git ignore rules
โโโ ๐ LICENSE # MIT License
โโโ ๐ README.md # This file
๐ ๏ธ Development
Setting Up Development Environment
-
Clone the repository:
git clone https://github.com/SasukeSagara/CouchDB-OpenAPI-scheme-generator.git cd couchdb-openapi-scheme-generator
-
Install development dependencies:
uv sync --dev
-
Create
.envfile:cp .env.example .env # If you have an example file # Or create manually with: # COUCHDB_USER=admin # COUCHDB_PASSWORD=your_secure_password
-
Start CouchDB:
docker-compose up -d
-
Run tests (if available):
uv run pytest
Code Style
This project follows PEP 8 style guidelines. Consider using:
blackfor code formattingflake8orrufffor lintingmypyfor type checking
๐ค Contributing
Contributions are welcome! ๐
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Contribution Guidelines
- ๐ Follow the existing code style
- โ Add tests for new features
- ๐ Update documentation as needed
- ๐ Report bugs using GitHub Issues
- ๐ก Suggest enhancements using GitHub Discussions
๐ License
This project is distributed under the MIT License. See the LICENSE file for details.
โญ Show Your Support
If you find this project helpful, please consider:
- โญ Starring this repository
- ๐ด Forking this repository
- ๐ Reporting bugs
- ๐ก Suggesting new features
- ๐ Improving documentation
- ๐ค Contributing code
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file couchdb_openapi_scheme_generator-1.0.2.tar.gz.
File metadata
- Download URL: couchdb_openapi_scheme_generator-1.0.2.tar.gz
- Upload date:
- Size: 29.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00983e38b1aa0de43fb8f25b558cb33b522a53011a7023252ac56e69d2d79779
|
|
| MD5 |
4f218d3bf271de3954eb4eb8f23429d6
|
|
| BLAKE2b-256 |
0a757f1c37f72511a74a518357ef31f0153f8204f7c4582878bd0aca9fa7a8ce
|
File details
Details for the file couchdb_openapi_scheme_generator-1.0.2-py3-none-any.whl.
File metadata
- Download URL: couchdb_openapi_scheme_generator-1.0.2-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55ca085c7658ebdeccc503009dfbe1ab744df631efe0040a57df938696725ce6
|
|
| MD5 |
bf8311a75d8a277e415013ae9d9a6a97
|
|
| BLAKE2b-256 |
d6edb00bc81f8fbb76c68dd8fa059e147af46dd784011acc300776e8e9e26adb
|