Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: Bug Report
about: Create a report to help us improve
title: '[BUG] '
labels: bug
assignees: ''
---


## Bug Description

<!-- A clear and concise description of what the bug is -->

## To Reproduce

Steps to reproduce the behavior:

1.
2.
3.

## Expected Behavior

<!-- What you expected to happen -->

## Actual Behavior

<!-- What actually happened -->

## Code Sample

```python
# Minimal code that reproduces the issue
from blocknote.converter import dict_to_blocks

# Your code here
```

## Error Message

```
# Paste the full error message and stack trace here
```

## Environment

- **OS**: [e.g., macOS 14.0, Ubuntu 22.04, Windows 11]
- **Python Version**: [e.g., 3.11.5]
- **blocknote-py Version**: [e.g., 0.1.0]
- **Installation Method**: [e.g., pip, uv]

## Additional Context

<!-- Add any other context about the problem here -->
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Feature Request
about: Suggest an idea for this project
title: '[FEATURE] '
labels: enhancement
assignees: ''
---

## Feature Description

<!-- A clear and concise description of the feature you'd like -->

## Problem Statement

<!-- Is your feature request related to a problem? Please describe -->
<!-- Example: I'm always frustrated when [...] -->

## Proposed Solution

<!-- Describe the solution you'd like -->

## Use Case

<!-- Describe how this feature would be used -->

```python
# Example of how the feature might be used
from blocknote.converter import your_new_feature

# Usage example
result = your_new_feature(...)
```

## Alternatives Considered

<!-- Describe any alternative solutions or features you've considered -->

## Additional Context

<!-- Add any other context or screenshots about the feature request here -->
78 changes: 44 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
# blocknote-py
# blocknote-py 🐍✨

[![Python Version](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/)
[![Python Version](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![PyPI version](https://badge.fury.io/py/blocknote-py.svg)](https://pypi.org/project/blocknote-py/)
[![CI](https://github.com/rohansharmasitoula/blocknote-py/workflows/CI/badge.svg)](https://github.com/rohansharmasitoula/blocknote-py/actions)

A Python library for working with Blocknote.js blocks. Convert between dictionaries, markdown, and Blocknote block objects with full type safety and validation.
> **Transform your BlockNote.js blocks like magic!** ✨ Convert between dictionaries, markdown, and BlockNote blocks with full type safety and validation.

## Features
Built with ❤️ using [Gemini CLI](https://codeium.com/windsurf) (Cascade)

- **Type-safe Blocknote blocks**: Pydantic models with full validation
- **Bidirectional conversion**: Convert between dictionaries, markdown, and Blocknote blocks
- **Dictionary conversion**: Convert dictionaries to validated Block objects
- **Markdown parsing**: Parse markdown into Blocknote blocks
- **Markdown generation**: Convert Blocknote blocks back to markdown
- **Text styling support**: Bold and italic text formatting
- **Lists**: Both ordered and unordered lists
- **Extensible architecture**: Easy to add new block types and converters
- **Comprehensive testing**: Full test coverage with pytest
## ✨ Why blocknote-py?

## Installation
Ever wanted to work with BlockNote.js blocks in Python? Now you can! 🎉

```bash
uv add blocknote-py
```
- 🔄 **Bidirectional Magic**: Dict ↔ Blocks ↔ Markdown (it just works!)
- 🛡️ **Type-Safe**: Pydantic models keep your data squeaky clean
- 🎨 **Style Support**: Bold, italic, and more formatting options
- 📝 **Lists Galore**: Bullets, numbers, checks - we got 'em all
- 🧪 **Battle-Tested**: 43 tests and counting
- 🚀 **Fast & Easy**: Simple API, powerful results

Or install from source:
## 📦 Installation

```bash
git clone https://github.com/yourusername/blocknote-py.git
cd blocknote-py
uv sync --dev
# With uv (recommended)
uv add blocknote-py

# Or with pip
pip install blocknote-py
```

## Quick Start
That's it! You're ready to roll! 🎸

## 🚀 Quick Start

### Basic Usage
### The Magic in Action

```python
from blocknote.converter import dict_to_blocks, markdown_to_blocks, blocks_to_markdown, blocks_to_dict
Expand Down Expand Up @@ -251,20 +251,30 @@ src/
│ └── test_md_to_blocknote.py
```

## Contributing
## 🤝 Contributing

We love contributions! Got an idea? Found a bug? Let's make this better together!

1. 🍴 Fork it
2. 🌿 Create your feature branch (`git checkout -b feature/awesome-feature`)
3. ✨ Commit your changes (`git commit -m 'Add awesome feature'`)
4. 🚀 Push to the branch (`git push origin feature/awesome-feature`)
5. 🎉 Open a Pull Request

Check out [CONTRIBUTING.md](CONTRIBUTING.md) for more details!

## 📄 License

MIT License - go wild! See [LICENSE](LICENSE) for details.

Contributions are welcome! Please feel free to submit a Pull Request.
## 🔗 Related Projects

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
- [BlockNote.js](https://github.com/TypeCellOS/BlockNote) - The awesome JavaScript library that started it all

## License
---

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Made with ❤️ and ☕ by [Rohan Sharma](https://github.com/rohansharmasitoula)

## Related Projects
**Star this repo if you find it useful!** ⭐

- [Blocknote.js](https://github.com/TypeCellOS/BlockNote) - The original JavaScript library
[![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20A%20Coffee-☕-yellow.svg)](https://buymeacoffee.com/sitoularohansharma)