bearkit 1.6.0__tar.gz → 1.6.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
bearkit-1.6.2/PKG-INFO ADDED
@@ -0,0 +1,135 @@
1
+ Metadata-Version: 2.4
2
+ Name: bearkit
3
+ Version: 1.6.2
4
+ Summary: Python toolkit for the Bear notes app - read, search, secret detection, and verified writes
5
+ Keywords: bear,notes,markdown,macos
6
+ Author: Michel Tricot
7
+ Author-email: Michel Tricot <michel.tricot@gmail.com>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Operating System :: MacOS
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Topic :: Software Development :: Libraries
14
+ Requires-Dist: detect-secrets>=1.5.0
15
+ Requires-Dist: rapidfuzz>=3.14.5
16
+ Requires-Python: >=3.13
17
+ Project-URL: Documentation, https://github.com/michel-tricot/bearcli/blob/main/docs/BEARKIT.md
18
+ Project-URL: Homepage, https://michel-tricot.github.io/bearcli/
19
+ Project-URL: Repository, https://github.com/michel-tricot/bearcli
20
+ Description-Content-Type: text/markdown
21
+
22
+ <div align="center">
23
+
24
+ # 🐻 `bearkit`
25
+
26
+ **The Python toolkit for [Bear](https://bear.app) notes** - read, search, and
27
+ write your notes from Python, with secret detection built in.
28
+
29
+ [![PyPI](https://img.shields.io/pypi/v/bearkit.svg)](https://pypi.org/project/bearkit/)
30
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/michel-tricot/bearcli/blob/main/LICENSE)
31
+ [![Python 3.13+](https://img.shields.io/badge/python-3.13%2B-blue.svg)](https://pypi.org/project/bearkit/)
32
+ [![macOS](https://img.shields.io/badge/platform-macOS-lightgrey.svg)](#)
33
+
34
+ [**API reference**](https://github.com/michel-tricot/bearcli/blob/main/docs/BEARKIT.md) ·
35
+ [Website](https://michel-tricot.github.io/bearcli/) ·
36
+ [`bearcli`](https://pypi.org/project/bearcli/) (the CLI & terminal UI built on it)
37
+
38
+ </div>
39
+
40
+ ---
41
+
42
+ ## Install
43
+
44
+ ```sh
45
+ pip install bearkit # or: uv add bearkit
46
+ ```
47
+
48
+ Lightweight by design: no CLI or UI dependencies, just the fundamentals.
49
+
50
+ ## Quick start
51
+
52
+ One object, `Bear`, for everything:
53
+
54
+ ```python
55
+ from bearkit import Bear
56
+
57
+ with Bear() as bear:
58
+ for note in bear.list_notes(tag="work", limit=10):
59
+ print(note.title, note.tags)
60
+ ```
61
+
62
+ ## Read and search
63
+
64
+ Filter by tag (nested sub-tags included), dates, or status; search naively or
65
+ fuzzily, scoped to tags and widened to archived or trashed notes:
66
+
67
+ ```python
68
+ from bearkit import Bear
69
+
70
+ with Bear() as bear:
71
+ pinned = bear.list_notes(only="pinned")
72
+ note = bear.get_note("C44D09DC") # a unique 4+ char id prefix works
73
+
74
+ for result in bear.search("quarterly planing", fuzzy=True)[:5]:
75
+ print(f"{result.score:5.1f} {result.note.title}")
76
+ for result in bear.search("invoice", tag=["work", "clients"], include_archived=True):
77
+ print(result.note.title, result.snippet)
78
+ ```
79
+
80
+ ## Verified writes
81
+
82
+ Writes go through the Bear app itself and are verified before returning - you
83
+ get the fresh note back, or `BearWriteError` if Bear didn't apply the change:
84
+
85
+ ```python
86
+ from bearkit import Bear, BearWriteError
87
+
88
+ with Bear() as bear:
89
+ try:
90
+ note = bear.create_note("Meeting notes", text="agenda...", tags=["work"])
91
+ bear.add_tag(note, "from-python")
92
+ except BearWriteError:
93
+ print("Bear did not apply the change")
94
+ ```
95
+
96
+ Also: `add_text` (append/prepend/replace), `rename`, `attach_file`, `trash`,
97
+ `archive`, `rename_tag`, `delete_tag`, and `open` to bring a note up in Bear.
98
+
99
+ ## Secret detection
100
+
101
+ Scan notes for leaked credentials (token formats, key blocks, credential
102
+ assignments, high-entropy strings) - fully offline - and redact before
103
+ sharing:
104
+
105
+ ```python
106
+ from bearkit import Bear
107
+
108
+ with Bear() as bear:
109
+ notes = bear.list_notes(limit=None, include_archived=True)
110
+ report = bear.scan_secrets(notes)
111
+ for finding in report:
112
+ print(finding.note_title, finding.rule, finding.excerpt) # excerpt is safe to print
113
+ for note in notes:
114
+ if report.has(note.id):
115
+ safe = report.redact(note) # text with [redacted: <rule>] placeholders
116
+ ```
117
+
118
+ > **⚠️ Warning** - detection is best-effort: a secret that reads like ordinary
119
+ > prose will not be caught. Ideally, don't keep secrets in notes at all.
120
+
121
+ ## Good to know
122
+
123
+ - **Typed** - ships `py.typed`; the full API is annotated.
124
+ - **Encrypted notes** are listed with their metadata, but their content stays
125
+ in Bear (`note.text` is `None`).
126
+ - **Every public function has a runnable sample** in the
127
+ [API reference](https://github.com/michel-tricot/bearcli/blob/main/docs/BEARKIT.md).
128
+ - Want a ready-made tool instead of a library? `bearkit` powers
129
+ [`bearcli`](https://pypi.org/project/bearcli/) - the CLI and full terminal
130
+ UI, including markdown export and git mirroring.
131
+
132
+ ## License
133
+
134
+ [MIT](https://github.com/michel-tricot/bearcli/blob/main/LICENSE) · not
135
+ affiliated with [Shiny Frog](https://shinyfrog.app)
@@ -0,0 +1,114 @@
1
+ <div align="center">
2
+
3
+ # 🐻 `bearkit`
4
+
5
+ **The Python toolkit for [Bear](https://bear.app) notes** - read, search, and
6
+ write your notes from Python, with secret detection built in.
7
+
8
+ [![PyPI](https://img.shields.io/pypi/v/bearkit.svg)](https://pypi.org/project/bearkit/)
9
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/michel-tricot/bearcli/blob/main/LICENSE)
10
+ [![Python 3.13+](https://img.shields.io/badge/python-3.13%2B-blue.svg)](https://pypi.org/project/bearkit/)
11
+ [![macOS](https://img.shields.io/badge/platform-macOS-lightgrey.svg)](#)
12
+
13
+ [**API reference**](https://github.com/michel-tricot/bearcli/blob/main/docs/BEARKIT.md) ·
14
+ [Website](https://michel-tricot.github.io/bearcli/) ·
15
+ [`bearcli`](https://pypi.org/project/bearcli/) (the CLI & terminal UI built on it)
16
+
17
+ </div>
18
+
19
+ ---
20
+
21
+ ## Install
22
+
23
+ ```sh
24
+ pip install bearkit # or: uv add bearkit
25
+ ```
26
+
27
+ Lightweight by design: no CLI or UI dependencies, just the fundamentals.
28
+
29
+ ## Quick start
30
+
31
+ One object, `Bear`, for everything:
32
+
33
+ ```python
34
+ from bearkit import Bear
35
+
36
+ with Bear() as bear:
37
+ for note in bear.list_notes(tag="work", limit=10):
38
+ print(note.title, note.tags)
39
+ ```
40
+
41
+ ## Read and search
42
+
43
+ Filter by tag (nested sub-tags included), dates, or status; search naively or
44
+ fuzzily, scoped to tags and widened to archived or trashed notes:
45
+
46
+ ```python
47
+ from bearkit import Bear
48
+
49
+ with Bear() as bear:
50
+ pinned = bear.list_notes(only="pinned")
51
+ note = bear.get_note("C44D09DC") # a unique 4+ char id prefix works
52
+
53
+ for result in bear.search("quarterly planing", fuzzy=True)[:5]:
54
+ print(f"{result.score:5.1f} {result.note.title}")
55
+ for result in bear.search("invoice", tag=["work", "clients"], include_archived=True):
56
+ print(result.note.title, result.snippet)
57
+ ```
58
+
59
+ ## Verified writes
60
+
61
+ Writes go through the Bear app itself and are verified before returning - you
62
+ get the fresh note back, or `BearWriteError` if Bear didn't apply the change:
63
+
64
+ ```python
65
+ from bearkit import Bear, BearWriteError
66
+
67
+ with Bear() as bear:
68
+ try:
69
+ note = bear.create_note("Meeting notes", text="agenda...", tags=["work"])
70
+ bear.add_tag(note, "from-python")
71
+ except BearWriteError:
72
+ print("Bear did not apply the change")
73
+ ```
74
+
75
+ Also: `add_text` (append/prepend/replace), `rename`, `attach_file`, `trash`,
76
+ `archive`, `rename_tag`, `delete_tag`, and `open` to bring a note up in Bear.
77
+
78
+ ## Secret detection
79
+
80
+ Scan notes for leaked credentials (token formats, key blocks, credential
81
+ assignments, high-entropy strings) - fully offline - and redact before
82
+ sharing:
83
+
84
+ ```python
85
+ from bearkit import Bear
86
+
87
+ with Bear() as bear:
88
+ notes = bear.list_notes(limit=None, include_archived=True)
89
+ report = bear.scan_secrets(notes)
90
+ for finding in report:
91
+ print(finding.note_title, finding.rule, finding.excerpt) # excerpt is safe to print
92
+ for note in notes:
93
+ if report.has(note.id):
94
+ safe = report.redact(note) # text with [redacted: <rule>] placeholders
95
+ ```
96
+
97
+ > **⚠️ Warning** - detection is best-effort: a secret that reads like ordinary
98
+ > prose will not be caught. Ideally, don't keep secrets in notes at all.
99
+
100
+ ## Good to know
101
+
102
+ - **Typed** - ships `py.typed`; the full API is annotated.
103
+ - **Encrypted notes** are listed with their metadata, but their content stays
104
+ in Bear (`note.text` is `None`).
105
+ - **Every public function has a runnable sample** in the
106
+ [API reference](https://github.com/michel-tricot/bearcli/blob/main/docs/BEARKIT.md).
107
+ - Want a ready-made tool instead of a library? `bearkit` powers
108
+ [`bearcli`](https://pypi.org/project/bearcli/) - the CLI and full terminal
109
+ UI, including markdown export and git mirroring.
110
+
111
+ ## License
112
+
113
+ [MIT](https://github.com/michel-tricot/bearcli/blob/main/LICENSE) · not
114
+ affiliated with [Shiny Frog](https://shinyfrog.app)
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "bearkit"
3
- version = "1.6.0"
4
- description = "Python toolkit for the Bear notes app read, search, secret detection, and verified writes"
3
+ version = "1.6.2"
4
+ description = "Python toolkit for the Bear notes app - read, search, secret detection, and verified writes"
5
5
  readme = "README.md"
6
6
  keywords = ["bear", "notes", "markdown", "macos"]
7
7
  classifiers = [
bearkit-1.6.0/PKG-INFO DELETED
@@ -1,39 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: bearkit
3
- Version: 1.6.0
4
- Summary: Python toolkit for the Bear notes app — read, search, secret detection, and verified writes
5
- Keywords: bear,notes,markdown,macos
6
- Author: Michel Tricot
7
- Author-email: Michel Tricot <michel.tricot@gmail.com>
8
- License-Expression: MIT
9
- License-File: LICENSE
10
- Classifier: Development Status :: 5 - Production/Stable
11
- Classifier: Operating System :: MacOS
12
- Classifier: Programming Language :: Python :: 3.13
13
- Classifier: Topic :: Software Development :: Libraries
14
- Requires-Dist: detect-secrets>=1.5.0
15
- Requires-Dist: rapidfuzz>=3.14.5
16
- Requires-Python: >=3.13
17
- Project-URL: Documentation, https://github.com/michel-tricot/bearcli/blob/main/docs/BEARKIT.md
18
- Project-URL: Homepage, https://michel-tricot.github.io/bearcli/
19
- Project-URL: Repository, https://github.com/michel-tricot/bearcli
20
- Description-Content-Type: text/markdown
21
-
22
- # 🐻 `bearkit`
23
-
24
- The Python toolkit for the [Bear](https://bear.app) notes app: read your
25
- notes, write them through the Bear app with verification, search them, and
26
- detect secrets - all offline. macOS only.
27
-
28
- ```python
29
- from bearkit import Bear
30
-
31
- with Bear() as bear:
32
- for note in bear.list_notes(tag="work", limit=10):
33
- print(note.title)
34
- ```
35
-
36
- Full API reference:
37
- [docs/BEARKIT.md](https://github.com/michel-tricot/bearcli/blob/main/docs/BEARKIT.md).
38
- `bearkit` powers [`bearcli`](https://pypi.org/project/bearcli/), the CLI and
39
- terminal UI; install that for the full tool.
bearkit-1.6.0/README.md DELETED
@@ -1,18 +0,0 @@
1
- # 🐻 `bearkit`
2
-
3
- The Python toolkit for the [Bear](https://bear.app) notes app: read your
4
- notes, write them through the Bear app with verification, search them, and
5
- detect secrets - all offline. macOS only.
6
-
7
- ```python
8
- from bearkit import Bear
9
-
10
- with Bear() as bear:
11
- for note in bear.list_notes(tag="work", limit=10):
12
- print(note.title)
13
- ```
14
-
15
- Full API reference:
16
- [docs/BEARKIT.md](https://github.com/michel-tricot/bearcli/blob/main/docs/BEARKIT.md).
17
- `bearkit` powers [`bearcli`](https://pypi.org/project/bearcli/), the CLI and
18
- terminal UI; install that for the full tool.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes