Skip to content

Commit 43b9a5c

Browse files
committed
Update README
1 parent 6dd797a commit 43b9a5c

File tree

6 files changed

+113
-62
lines changed

6 files changed

+113
-62
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2018-Present, Subhash Bhushan C.
3+
Copyright (c) 2018-2024, Subhash Bhushan C.
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following

README.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Protean
2+
3+
**Protean** is an opinionated and pragmatic framework for building event-driven applications using the CQRS pattern.
4+
5+
[![Release](https://img.shields.io/pypi/v/protean?label=Release&style=flat-square)](https://pypi.org/project/protean/)
6+
[![Build Status](https://github.com/proteanhq/protean/actions/workflows/ci.yml/badge.svg)](https://github.com/proteanhq/protean/actions/workflows/ci.yml)
7+
[![Coverage](https://codecov.io/gh/proteanhq/protean/graph/badge.svg?token=0sFuFdLBOx)](https://codecov.io/gh/proteanhq/protean)
8+
9+
## Installation
10+
11+
Protean is available on PyPI:
12+
13+
```console
14+
$ python -m pip install protean
15+
```
16+
17+
Protean officially supports Python 3.11+.
18+
19+
## Quick Start
20+
21+
```python
22+
from protean import Domain
23+
from protean.fields import String, Text
24+
25+
domain = Domain(__file__, "Publishing")
26+
27+
@domain.aggregate
28+
class Post:
29+
title = String(required=True, max_length=1000)
30+
slug = String(required=True, max_length=1024)
31+
content = Text(required=True)
32+
33+
domain.init()
34+
with domain.domain_context():
35+
post = Post(
36+
title="Hello World",
37+
slug="hello-world",
38+
content="Lorem Ipsum ..."
39+
)
40+
41+
domain.repository_for(Post).add(post)
42+
```
43+
44+
## Documentation
45+
46+
Online docs are available at https://docs.proteanhq.com.
47+
48+
## Contributing
49+
50+
1. Check for open issues or open a fresh issue to start a discussion
51+
around a feature idea or a bug.
52+
2. Fork [the repository](https://github.com/proteanhq/protean) on
53+
GitHub, branch off `main` and start making your changes.
54+
3. Write a test which shows that the bug was fixed or that the feature
55+
works as expected.
56+
4. Send a pull request and bug the maintainer until it gets merged and
57+
published.
58+
59+
For more information, please check out the
60+
[contributing guidelines](https://docs.proteanhq.com/community/contributing/).
61+
62+
## License
63+
64+
BSD 3-Clause License
65+
66+
Copyright (c) 2018-2024, Subhash Bhushan C.
67+
All rights reserved.
68+
69+
Redistribution and use in source and binary forms, with or without modification,
70+
are permitted provided that the following conditions are met:
71+
72+
* Redistributions of source code must retain the above copyright notice, this
73+
list of conditions and the following disclaimer.
74+
75+
* Redistributions in binary form must reproduce the above copyright notice,
76+
this list of conditions and the following disclaimer in the documentation
77+
and/or other materials provided with the distribution.
78+
79+
* Neither the name of the copyright holder nor the names of its contributors
80+
may be used to endorse or promote products derived from this software
81+
without specific prior written permission.
82+
83+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
84+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
85+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
86+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
87+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
88+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
89+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
90+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
91+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
92+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.rst

Lines changed: 0 additions & 50 deletions
This file was deleted.

docs/community/contributing.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ without your patch. Run the tests as described below.
7272
- Push your commits to your fork on GitHub and [create a pull request](
7373
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/
7474
proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request).
75-
Link to the issue being addressed with `fixes #123` or `closes #123` in the pull request.
75+
- Link to the issue being addressed with `fixes #123` or `closes #123` in the pull request.
7676

7777
```sh
7878
$ git push --set-upstream fork your-branch-name
@@ -86,13 +86,15 @@ Run the basic test suite with:
8686
$ protean test
8787
```
8888

89-
This runs the basic tests for the current environment, which is usually sufficient. If you want to run
90-
the full test suite, you can sep up dependent services locally with docker:
89+
This runs the basic tests for the current environment, which is usually
90+
sufficient. If you want to run the full test suite, you can sep up
91+
dependent services locally with docker:
9192

9293
```sh
9394
$ make up
9495
$ protean test -c FULL
9596
```
9697

97-
Running a full test will also generate a coverage report as part of test output. Writing tests for lines
98-
that do not have coverage is a great way to start contributing.
98+
Running a full test will also generate a coverage report as part of test
99+
output. Writing tests for lines that do not have coverage is a great way to
100+
start contributing.

docs/guides/domain-definition/aggregates.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,11 @@ below, `Post` has exactly one `Statistic` record associated with it.
197197
```
198198

199199
```shell
200-
>>> post = Post(title='Foo')
201-
>>> post.stats = Statistic(likes=10, dislikes=1)
202-
>>> current_domain.repository_for(Post).add(post)
200+
In [1]: post = Post(title='Foo')
201+
202+
In [2]: post.stats = Statistic(likes=10, dislikes=1)
203+
204+
In [3]: current_domain.repository_for(Post).add(post)
203205
```
204206

205207
### `HasMany`
@@ -211,8 +213,6 @@ below, `Post` has exactly one `Statistic` record associated with it.
211213
Below is an example of adding multiple comments to the domain defined above:
212214

213215
```shell
214-
❯ protean shell --domain docs_src/guides/domain-definition/008.py
215-
...
216216
In [1]: from protean.globals import current_domain
217217

218218
In [2]: post = Post(title='Foo')

mkdocs.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ repo_name: proteanhq/protean
44
repo_url: https://github.com/proteanhq/protean
55
theme:
66
name: material
7+
font:
8+
text: Inter
9+
code: JetBrains Mono
710
palette:
811
- media: '(prefers-color-scheme: light)'
912
scheme: default
@@ -36,6 +39,8 @@ theme:
3639
- content.code.annotate
3740
- content.code.copy
3841
- content.code.select
42+
plugins:
43+
- privacy
3944
markdown_extensions:
4045
- admonition
4146
- attr_list
@@ -200,4 +205,6 @@ nav:
200205
# - changelog.md
201206
- Community:
202207
- community/index.md
203-
- community/contributing.md
208+
- community/contributing.md
209+
extra_css:
210+
- stylesheets/extra.css

0 commit comments

Comments
 (0)