flet-permission-handler 0.2.0.dev505__tar.gz → 0.70.0.dev6301__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.

Potentially problematic release.


This version of flet-permission-handler might be problematic. Click here for more details.

Files changed (26) hide show
  1. {flet_permission_handler-0.2.0.dev505/src/flet_permission_handler.egg-info → flet_permission_handler-0.70.0.dev6301}/PKG-INFO +12 -24
  2. {flet_permission_handler-0.2.0.dev505 → flet_permission_handler-0.70.0.dev6301}/README.md +6 -18
  3. flet_permission_handler-0.70.0.dev6301/pyproject.toml +24 -0
  4. {flet_permission_handler-0.2.0.dev505 → flet_permission_handler-0.70.0.dev6301}/src/flet_permission_handler/permission_handler.py +3 -28
  5. {flet_permission_handler-0.2.0.dev505 → flet_permission_handler-0.70.0.dev6301}/src/flet_permission_handler/types.py +2 -2
  6. {flet_permission_handler-0.2.0.dev505 → flet_permission_handler-0.70.0.dev6301/src/flet_permission_handler.egg-info}/PKG-INFO +12 -24
  7. {flet_permission_handler-0.2.0.dev505 → flet_permission_handler-0.70.0.dev6301}/src/flet_permission_handler.egg-info/SOURCES.txt +0 -4
  8. flet_permission_handler-0.70.0.dev6301/src/flet_permission_handler.egg-info/requires.txt +1 -0
  9. flet_permission_handler-0.70.0.dev6301/src/flutter/flet_permission_handler/pubspec.yaml +23 -0
  10. flet_permission_handler-0.2.0.dev505/pyproject.toml +0 -99
  11. flet_permission_handler-0.2.0.dev505/src/flet_permission_handler.egg-info/requires.txt +0 -1
  12. flet_permission_handler-0.2.0.dev505/src/flutter/flet_permission_handler/CHANGELOG.md +0 -3
  13. flet_permission_handler-0.2.0.dev505/src/flutter/flet_permission_handler/LICENSE +0 -201
  14. flet_permission_handler-0.2.0.dev505/src/flutter/flet_permission_handler/README.md +0 -3
  15. flet_permission_handler-0.2.0.dev505/src/flutter/flet_permission_handler/pubspec.lock +0 -832
  16. flet_permission_handler-0.2.0.dev505/src/flutter/flet_permission_handler/pubspec.yaml +0 -23
  17. {flet_permission_handler-0.2.0.dev505 → flet_permission_handler-0.70.0.dev6301}/LICENSE +0 -0
  18. {flet_permission_handler-0.2.0.dev505 → flet_permission_handler-0.70.0.dev6301}/setup.cfg +0 -0
  19. {flet_permission_handler-0.2.0.dev505 → flet_permission_handler-0.70.0.dev6301}/src/flet_permission_handler/__init__.py +0 -0
  20. {flet_permission_handler-0.2.0.dev505 → flet_permission_handler-0.70.0.dev6301}/src/flet_permission_handler.egg-info/dependency_links.txt +0 -0
  21. {flet_permission_handler-0.2.0.dev505 → flet_permission_handler-0.70.0.dev6301}/src/flet_permission_handler.egg-info/top_level.txt +0 -0
  22. {flet_permission_handler-0.2.0.dev505 → flet_permission_handler-0.70.0.dev6301}/src/flutter/flet_permission_handler/analysis_options.yaml +0 -0
  23. {flet_permission_handler-0.2.0.dev505 → flet_permission_handler-0.70.0.dev6301}/src/flutter/flet_permission_handler/lib/flet_permission_handler.dart +0 -0
  24. {flet_permission_handler-0.2.0.dev505 → flet_permission_handler-0.70.0.dev6301}/src/flutter/flet_permission_handler/lib/src/extension.dart +0 -0
  25. {flet_permission_handler-0.2.0.dev505 → flet_permission_handler-0.70.0.dev6301}/src/flutter/flet_permission_handler/lib/src/permission_handler.dart +0 -0
  26. {flet_permission_handler-0.2.0.dev505 → flet_permission_handler-0.70.0.dev6301}/src/flutter/flet_permission_handler/lib/src/utils/permission_handler.dart +0 -0
@@ -1,24 +1,24 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flet-permission-handler
3
- Version: 0.2.0.dev505
4
- Summary: A Flet extension that simplifies working with permissions in your app.
3
+ Version: 0.70.0.dev6301
4
+ Summary: Manage runtime permissions in Flet apps.
5
5
  Author-email: Flet contributors <hello@flet.dev>
6
6
  License-Expression: Apache-2.0
7
7
  Project-URL: Homepage, https://flet.dev
8
- Project-URL: Documentation, https://flet-dev.github.io/flet-permission-handler
9
- Project-URL: Repository, https://github.com/flet-dev/flet-permission-handler
10
- Project-URL: Issues, https://github.com/flet-dev/flet-permission-handler/issues
8
+ Project-URL: Documentation, https://docs.flet.dev/permission-handler
9
+ Project-URL: Repository, https://github.com/flet-dev/flet/tree/main/sdk/python/packages/flet-permission-handler
10
+ Project-URL: Issues, https://github.com/flet-dev/flet/issues
11
11
  Requires-Python: >=3.10
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
- Requires-Dist: flet>=0.70.0.dev0
14
+ Requires-Dist: flet==0.70.0.dev6301
15
15
  Dynamic: license-file
16
16
 
17
17
  # flet-permission-handler
18
18
 
19
19
  [![pypi](https://img.shields.io/pypi/v/flet-permission-handler.svg)](https://pypi.python.org/pypi/flet-permission-handler)
20
20
  [![downloads](https://static.pepy.tech/badge/flet-permission-handler/month)](https://pepy.tech/project/flet-permission-handler)
21
- [![license](https://img.shields.io/github/license/flet-dev/flet-permission-handler.svg)](https://github.com/flet-dev/flet-permission-handler/blob/main/LICENSE)
21
+ [![license](https://img.shields.io/github/license/flet-dev/flet.svg)](https://github.com/flet-dev/flet/blob/main/sdk/python/packages/flet-permission-handler/LICENSE)
22
22
 
23
23
  A [Flet](https://flet.dev) extension that simplifies working with device permissions.
24
24
 
@@ -31,20 +31,13 @@ and brings similar functionality to Flet, including:
31
31
 
32
32
  ## Documentation
33
33
 
34
- Detailed documentation to this package can be found [here](https://flet-dev.github.io/flet-permission-handler/).
34
+ Detailed documentation to this package can be found [here](https://docs.flet.dev/permission-handler/).
35
35
 
36
36
  ## Platform Support
37
37
 
38
- This package supports the following platforms:
39
-
40
- | Platform | Supported |
41
- |----------|:---------:|
42
- | Windows | ✅ |
43
- | macOS | ❌ |
44
- | Linux | ❌ |
45
- | iOS | ✅ |
46
- | Android | ✅ |
47
- | Web | ✅ |
38
+ | Platform | Windows | macOS | Linux | iOS | Android | Web |
39
+ |----------|---------|-------|-------|-----|---------|-----|
40
+ | Supported| ✅ | ❌ | ❌ | ✅ | ✅ | ✅ |
48
41
 
49
42
  ## Usage
50
43
 
@@ -63,11 +56,6 @@ To install the `flet-permission-handler` package and add it to your project depe
63
56
  ```
64
57
  After this, you will have to manually add this package to your `requirements.txt` or `pyproject.toml`.
65
58
 
66
- - Using `poetry`:
67
- ```bash
68
- poetry add flet-permission-handler
69
- ```
70
-
71
59
  ### Examples
72
60
 
73
- For examples, see [these](./examples).
61
+ For examples, see [these](https://github.com/flet-dev/flet/tree/main/sdk/python/examples/controls/permission_handler).
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![pypi](https://img.shields.io/pypi/v/flet-permission-handler.svg)](https://pypi.python.org/pypi/flet-permission-handler)
4
4
  [![downloads](https://static.pepy.tech/badge/flet-permission-handler/month)](https://pepy.tech/project/flet-permission-handler)
5
- [![license](https://img.shields.io/github/license/flet-dev/flet-permission-handler.svg)](https://github.com/flet-dev/flet-permission-handler/blob/main/LICENSE)
5
+ [![license](https://img.shields.io/github/license/flet-dev/flet.svg)](https://github.com/flet-dev/flet/blob/main/sdk/python/packages/flet-permission-handler/LICENSE)
6
6
 
7
7
  A [Flet](https://flet.dev) extension that simplifies working with device permissions.
8
8
 
@@ -15,20 +15,13 @@ and brings similar functionality to Flet, including:
15
15
 
16
16
  ## Documentation
17
17
 
18
- Detailed documentation to this package can be found [here](https://flet-dev.github.io/flet-permission-handler/).
18
+ Detailed documentation to this package can be found [here](https://docs.flet.dev/permission-handler/).
19
19
 
20
20
  ## Platform Support
21
21
 
22
- This package supports the following platforms:
23
-
24
- | Platform | Supported |
25
- |----------|:---------:|
26
- | Windows | ✅ |
27
- | macOS | ❌ |
28
- | Linux | ❌ |
29
- | iOS | ✅ |
30
- | Android | ✅ |
31
- | Web | ✅ |
22
+ | Platform | Windows | macOS | Linux | iOS | Android | Web |
23
+ |----------|---------|-------|-------|-----|---------|-----|
24
+ | Supported| ✅ | ❌ | ❌ | ✅ | ✅ | ✅ |
32
25
 
33
26
  ## Usage
34
27
 
@@ -47,11 +40,6 @@ To install the `flet-permission-handler` package and add it to your project depe
47
40
  ```
48
41
  After this, you will have to manually add this package to your `requirements.txt` or `pyproject.toml`.
49
42
 
50
- - Using `poetry`:
51
- ```bash
52
- poetry add flet-permission-handler
53
- ```
54
-
55
43
  ### Examples
56
44
 
57
- For examples, see [these](./examples).
45
+ For examples, see [these](https://github.com/flet-dev/flet/tree/main/sdk/python/examples/controls/permission_handler).
@@ -0,0 +1,24 @@
1
+ [project]
2
+ name = "flet-permission-handler"
3
+ version = "0.70.0.dev6301"
4
+ description = "Manage runtime permissions in Flet apps."
5
+ readme = "README.md"
6
+ authors = [{ name = "Flet contributors", email = "hello@flet.dev" }]
7
+ license = "Apache-2.0"
8
+ requires-python = ">=3.10"
9
+ dependencies = [
10
+ "flet==0.70.0.dev6301",
11
+ ]
12
+
13
+ [project.urls]
14
+ Homepage = "https://flet.dev"
15
+ Documentation = "https://docs.flet.dev/permission-handler"
16
+ Repository = "https://github.com/flet-dev/flet/tree/main/sdk/python/packages/flet-permission-handler"
17
+ Issues = "https://github.com/flet-dev/flet/issues"
18
+
19
+ [tool.setuptools.package-data]
20
+ "flutter.flet_permission_handler" = ["**/*"]
21
+
22
+ [build-system]
23
+ requires = ["setuptools"]
24
+ build-backend = "setuptools.build_meta"
@@ -1,7 +1,6 @@
1
1
  from typing import Optional
2
2
 
3
3
  import flet as ft
4
-
5
4
  from flet_permission_handler.types import Permission, PermissionStatus
6
5
 
7
6
  __all__ = ["PermissionHandler"]
@@ -12,9 +11,6 @@ class PermissionHandler(ft.Service):
12
11
  """
13
12
  Manages permissions for the application.
14
13
 
15
- This control is non-visual and should be added
16
- to [`Page.services`][flet.Page.services] list.
17
-
18
14
  Danger: Platform support
19
15
  Currently only supported on Android, iOS, Windows, and Web platforms.
20
16
 
@@ -40,68 +36,47 @@ class PermissionHandler(ft.Service):
40
36
  "Windows, and Web platforms."
41
37
  )
42
38
 
43
- async def get_status(
44
- self, permission: Permission, timeout: int = 10
45
- ) -> Optional[PermissionStatus]:
39
+ async def get_status(self, permission: Permission) -> Optional[PermissionStatus]:
46
40
  """
47
41
  Gets the current status of the given `permission`.
48
42
 
49
43
  Args:
50
44
  permission: The `Permission` to check the status for.
51
- timeout: The maximum amount of time (in seconds) to wait for a response.
52
45
 
53
46
  Returns:
54
47
  A `PermissionStatus` if the status is known, otherwise `None`.
55
-
56
- Raises:
57
- TimeoutError: If the request times out.
58
48
  """
59
49
  status = await self._invoke_method(
60
50
  method_name="get_status",
61
51
  arguments={"permission": permission},
62
- timeout=timeout,
63
52
  )
64
53
  return PermissionStatus(status) if status is not None else None
65
54
 
66
- async def request(
67
- self, permission: Permission, timeout: int = 60
68
- ) -> Optional[PermissionStatus]:
55
+ async def request(self, permission: Permission) -> Optional[PermissionStatus]:
69
56
  """
70
57
  Request the user for access to the `permission` if access hasn't already been
71
58
  granted access before.
72
59
 
73
60
  Args:
74
61
  permission: The `Permission` to request.
75
- timeout: The maximum amount of time (in seconds) to wait for a response.
76
62
 
77
63
  Returns:
78
64
  The new `PermissionStatus` after the request, or `None` if the request
79
65
  was not successful.
80
-
81
- Raises:
82
- TimeoutError: If the request times out.
83
66
  """
84
67
  r = await self._invoke_method(
85
68
  method_name="request",
86
69
  arguments={"permission": permission},
87
- timeout=timeout,
88
70
  )
89
71
  return PermissionStatus(r) if r is not None else None
90
72
 
91
- async def open_app_settings(self, timeout: int = 10) -> bool:
73
+ async def open_app_settings(self) -> bool:
92
74
  """
93
75
  Opens the app settings page.
94
76
 
95
- Args:
96
- timeout: The maximum amount of time (in seconds) to wait for a response.
97
-
98
77
  Returns:
99
78
  `True` if the app settings page could be opened, otherwise `False`.
100
-
101
- Raises:
102
- TimeoutError: If the request times out.
103
79
  """
104
80
  return await self._invoke_method(
105
81
  method_name="open_app_settings",
106
- timeout=timeout,
107
82
  )
@@ -258,7 +258,7 @@ class Permission(Enum):
258
258
 
259
259
  Info:
260
260
  When the privacy-friendly APIs (i.e. [Storage Access Framework](https://developer.android.com/guide/topics/providers/document-provider)
261
- or the [MediaStore](https://developer.android.com/training/data-storage/shared/media) APIs)
261
+ or the[MediaStore](https://developer.android.com/training/data-storage/shared/media) APIs)
262
262
  is all your app needs, the [PermissionGroup.storage] are the only
263
263
  permissions you need to request.
264
264
 
@@ -270,7 +270,7 @@ class Permission(Enum):
270
270
 
271
271
  Note:
272
272
  Only supported on Android 11+ (API 30+) only.
273
- """
273
+ """ # noqa: E501
274
274
 
275
275
  MEDIA_LIBRARY = "mediaLibrary"
276
276
  """
@@ -1,24 +1,24 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flet-permission-handler
3
- Version: 0.2.0.dev505
4
- Summary: A Flet extension that simplifies working with permissions in your app.
3
+ Version: 0.70.0.dev6301
4
+ Summary: Manage runtime permissions in Flet apps.
5
5
  Author-email: Flet contributors <hello@flet.dev>
6
6
  License-Expression: Apache-2.0
7
7
  Project-URL: Homepage, https://flet.dev
8
- Project-URL: Documentation, https://flet-dev.github.io/flet-permission-handler
9
- Project-URL: Repository, https://github.com/flet-dev/flet-permission-handler
10
- Project-URL: Issues, https://github.com/flet-dev/flet-permission-handler/issues
8
+ Project-URL: Documentation, https://docs.flet.dev/permission-handler
9
+ Project-URL: Repository, https://github.com/flet-dev/flet/tree/main/sdk/python/packages/flet-permission-handler
10
+ Project-URL: Issues, https://github.com/flet-dev/flet/issues
11
11
  Requires-Python: >=3.10
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
- Requires-Dist: flet>=0.70.0.dev0
14
+ Requires-Dist: flet==0.70.0.dev6301
15
15
  Dynamic: license-file
16
16
 
17
17
  # flet-permission-handler
18
18
 
19
19
  [![pypi](https://img.shields.io/pypi/v/flet-permission-handler.svg)](https://pypi.python.org/pypi/flet-permission-handler)
20
20
  [![downloads](https://static.pepy.tech/badge/flet-permission-handler/month)](https://pepy.tech/project/flet-permission-handler)
21
- [![license](https://img.shields.io/github/license/flet-dev/flet-permission-handler.svg)](https://github.com/flet-dev/flet-permission-handler/blob/main/LICENSE)
21
+ [![license](https://img.shields.io/github/license/flet-dev/flet.svg)](https://github.com/flet-dev/flet/blob/main/sdk/python/packages/flet-permission-handler/LICENSE)
22
22
 
23
23
  A [Flet](https://flet.dev) extension that simplifies working with device permissions.
24
24
 
@@ -31,20 +31,13 @@ and brings similar functionality to Flet, including:
31
31
 
32
32
  ## Documentation
33
33
 
34
- Detailed documentation to this package can be found [here](https://flet-dev.github.io/flet-permission-handler/).
34
+ Detailed documentation to this package can be found [here](https://docs.flet.dev/permission-handler/).
35
35
 
36
36
  ## Platform Support
37
37
 
38
- This package supports the following platforms:
39
-
40
- | Platform | Supported |
41
- |----------|:---------:|
42
- | Windows | ✅ |
43
- | macOS | ❌ |
44
- | Linux | ❌ |
45
- | iOS | ✅ |
46
- | Android | ✅ |
47
- | Web | ✅ |
38
+ | Platform | Windows | macOS | Linux | iOS | Android | Web |
39
+ |----------|---------|-------|-------|-----|---------|-----|
40
+ | Supported| ✅ | ❌ | ❌ | ✅ | ✅ | ✅ |
48
41
 
49
42
  ## Usage
50
43
 
@@ -63,11 +56,6 @@ To install the `flet-permission-handler` package and add it to your project depe
63
56
  ```
64
57
  After this, you will have to manually add this package to your `requirements.txt` or `pyproject.toml`.
65
58
 
66
- - Using `poetry`:
67
- ```bash
68
- poetry add flet-permission-handler
69
- ```
70
-
71
59
  ### Examples
72
60
 
73
- For examples, see [these](./examples).
61
+ For examples, see [these](https://github.com/flet-dev/flet/tree/main/sdk/python/examples/controls/permission_handler).
@@ -9,11 +9,7 @@ src/flet_permission_handler.egg-info/SOURCES.txt
9
9
  src/flet_permission_handler.egg-info/dependency_links.txt
10
10
  src/flet_permission_handler.egg-info/requires.txt
11
11
  src/flet_permission_handler.egg-info/top_level.txt
12
- src/flutter/flet_permission_handler/CHANGELOG.md
13
- src/flutter/flet_permission_handler/LICENSE
14
- src/flutter/flet_permission_handler/README.md
15
12
  src/flutter/flet_permission_handler/analysis_options.yaml
16
- src/flutter/flet_permission_handler/pubspec.lock
17
13
  src/flutter/flet_permission_handler/pubspec.yaml
18
14
  src/flutter/flet_permission_handler/lib/flet_permission_handler.dart
19
15
  src/flutter/flet_permission_handler/lib/src/extension.dart
@@ -0,0 +1,23 @@
1
+ name: flet_permission_handler
2
+ description: Flet Permission Handler control
3
+ version: 0.1.0
4
+ publish_to: none
5
+
6
+ environment:
7
+ sdk: '>=3.2.3 <4.0.0'
8
+ flutter: ">=1.17.0"
9
+
10
+ dependencies:
11
+ flutter:
12
+ sdk: flutter
13
+
14
+ collection: ^1.16.0
15
+ permission_handler: 12.0.1
16
+
17
+ flet:
18
+ path: ../../../../../../../packages/flet
19
+
20
+ dev_dependencies:
21
+ flutter_test:
22
+ sdk: flutter
23
+ flutter_lints: ^3.0.0
@@ -1,99 +0,0 @@
1
- [project]
2
- name = "flet-permission-handler"
3
- version = "0.2.0.dev505"
4
- description = "A Flet extension that simplifies working with permissions in your app."
5
- readme = "README.md"
6
- authors = [
7
- { name = "Flet contributors", email = "hello@flet.dev" }
8
- ]
9
- license = "Apache-2.0"
10
- requires-python = ">=3.10"
11
- dependencies = [
12
- "flet >=0.70.0.dev0",
13
- ]
14
-
15
- [project.urls]
16
- Homepage = "https://flet.dev"
17
- Documentation = "https://flet-dev.github.io/flet-permission-handler"
18
- Repository = "https://github.com/flet-dev/flet-permission-handler"
19
- Issues = "https://github.com/flet-dev/flet-permission-handler/issues"
20
-
21
- [tool.setuptools.package-data]
22
- "flutter.flet_permission_handler" = ["**/*"]
23
-
24
- [dependency-groups]
25
- test = [
26
- "pytest >=7.2.0",
27
- ]
28
- lint = [
29
- "ruff >=0.13.1",
30
- ]
31
- dev = [
32
- "pre-commit >=4.2.0",
33
- { include-group = 'lint' },
34
- { include-group = 'test' },
35
- ]
36
- docs-coverage = [
37
- "docstr-coverage >=2.3.2",
38
- ]
39
- docs = [
40
- "mkdocs >=1.6.1",
41
- "mkdocs-material >=9.6.20",
42
- "mkdocstrings-python >=1.18.2",
43
- "mkdocstrings-python-xref >=1.16.4",
44
- "mike >=2.1.3",
45
- "markdown >=3.9",
46
- "pymdown-extensions >=10.16.1",
47
- "mkdocs-exclude >=1.0.2",
48
- "mkdocs-glightbox >=0.5.1",
49
- "mkdocs-open-in-new-tab >=1.0.8",
50
- "mkdocs-section-index >=0.3.10",
51
- "griffe-modernized-annotations >=1.0.8",
52
- "griffe-warnings-deprecated >=1.1.0",
53
- "pygments >=2.16",
54
- "markdown-exec[ansi] >=1.11.0",
55
- "pydocstyle >=6.3.0",
56
- "linkcheckmd >=1.4.0",
57
- "mkdocs-external-images",
58
- { include-group = 'docs-coverage' },
59
- ]
60
- all = [
61
- { include-group = 'dev' },
62
- { include-group = 'docs' },
63
- ]
64
-
65
- [tool.uv.sources]
66
- mkdocs-external-images = { git = "https://github.com/flet-dev/mkdocs-external-images", tag = "v0.2.0" }
67
-
68
- [build-system]
69
- requires = ["setuptools"]
70
- build-backend = "setuptools.build_meta"
71
-
72
- [tool.ruff]
73
- line-length = 88
74
- target-version = "py39"
75
- fix = true
76
- show-fixes = true
77
-
78
- [tool.ruff.lint]
79
- select = [
80
- # pycodestyle
81
- "E",
82
- # Pyflakes
83
- "F",
84
- # pyupgrade
85
- "UP",
86
- # flake8-bugbear
87
- "B",
88
- # flake8-simplify
89
- "SIM",
90
- # isort
91
- "I"
92
- ]
93
- preview = true
94
- pydocstyle = { convention = 'google' }
95
-
96
- [tool.ruff.format]
97
- quote-style = "double"
98
- indent-style = "space"
99
- line-ending = "auto"
@@ -1,3 +0,0 @@
1
- # 0.1.0
2
-
3
- Initial release of the package.