stackport 0.1.4__tar.gz → 0.1.6__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.
Files changed (81) hide show
  1. {stackport-0.1.4/stackport.egg-info → stackport-0.1.6}/PKG-INFO +2 -1
  2. {stackport-0.1.4 → stackport-0.1.6}/README.md +1 -0
  3. {stackport-0.1.4 → stackport-0.1.6}/backend/config.py +1 -0
  4. {stackport-0.1.4 → stackport-0.1.6}/backend/main.py +17 -3
  5. {stackport-0.1.4 → stackport-0.1.6}/backend/routes/stats.py +15 -2
  6. {stackport-0.1.4 → stackport-0.1.6}/pyproject.toml +1 -1
  7. {stackport-0.1.4 → stackport-0.1.6/stackport.egg-info}/PKG-INFO +2 -1
  8. stackport-0.1.6/stackport.egg-info/SOURCES.txt +114 -0
  9. {stackport-0.1.4 → stackport-0.1.6}/tests/test_routes.py +6 -0
  10. stackport-0.1.6/ui/dist/assets/index-DI-V3ZCb.js +527 -0
  11. stackport-0.1.6/ui/dist/assets/index-DM3oKaVN.css +1 -0
  12. stackport-0.1.6/ui/dist/aws-icons/acm.svg +18 -0
  13. stackport-0.1.6/ui/dist/aws-icons/apigateway.svg +18 -0
  14. stackport-0.1.6/ui/dist/aws-icons/appsync.svg +20 -0
  15. stackport-0.1.6/ui/dist/aws-icons/athena.svg +18 -0
  16. stackport-0.1.6/ui/dist/aws-icons/cloudformation.svg +18 -0
  17. stackport-0.1.6/ui/dist/aws-icons/cloudfront.svg +18 -0
  18. stackport-0.1.6/ui/dist/aws-icons/cognito-idp.svg +18 -0
  19. stackport-0.1.6/ui/dist/aws-icons/dynamodb.svg +18 -0
  20. stackport-0.1.6/ui/dist/aws-icons/ec2.svg +18 -0
  21. stackport-0.1.6/ui/dist/aws-icons/ecr.svg +20 -0
  22. stackport-0.1.6/ui/dist/aws-icons/ecs.svg +20 -0
  23. stackport-0.1.6/ui/dist/aws-icons/elasticache.svg +18 -0
  24. stackport-0.1.6/ui/dist/aws-icons/elasticfilesystem.svg +18 -0
  25. stackport-0.1.6/ui/dist/aws-icons/elasticloadbalancing.svg +18 -0
  26. stackport-0.1.6/ui/dist/aws-icons/elasticmapreduce.svg +18 -0
  27. stackport-0.1.6/ui/dist/aws-icons/events.svg +18 -0
  28. stackport-0.1.6/ui/dist/aws-icons/firehose.svg +20 -0
  29. stackport-0.1.6/ui/dist/aws-icons/glue.svg +18 -0
  30. stackport-0.1.6/ui/dist/aws-icons/iam.svg +18 -0
  31. stackport-0.1.6/ui/dist/aws-icons/kinesis.svg +18 -0
  32. stackport-0.1.6/ui/dist/aws-icons/kms.svg +18 -0
  33. stackport-0.1.6/ui/dist/aws-icons/lambda.svg +18 -0
  34. stackport-0.1.6/ui/dist/aws-icons/logs.svg +18 -0
  35. stackport-0.1.6/ui/dist/aws-icons/monitoring.svg +18 -0
  36. stackport-0.1.6/ui/dist/aws-icons/rds.svg +18 -0
  37. stackport-0.1.6/ui/dist/aws-icons/route53.svg +18 -0
  38. stackport-0.1.6/ui/dist/aws-icons/s3.svg +18 -0
  39. stackport-0.1.6/ui/dist/aws-icons/secretsmanager.svg +18 -0
  40. stackport-0.1.6/ui/dist/aws-icons/ses.svg +16 -0
  41. stackport-0.1.6/ui/dist/aws-icons/sns.svg +18 -0
  42. stackport-0.1.6/ui/dist/aws-icons/sqs.svg +18 -0
  43. stackport-0.1.6/ui/dist/aws-icons/ssm.svg +18 -0
  44. stackport-0.1.6/ui/dist/aws-icons/stepfunctions.svg +18 -0
  45. stackport-0.1.6/ui/dist/aws-icons/wafv2.svg +18 -0
  46. stackport-0.1.6/ui/dist/index.html +28 -0
  47. stackport-0.1.4/stackport.egg-info/SOURCES.txt +0 -46
  48. stackport-0.1.4/ui/dist/assets/index-Co0XMz89.css +0 -1
  49. stackport-0.1.4/ui/dist/assets/index-R1rrNm8L.js +0 -455
  50. stackport-0.1.4/ui/dist/index.html +0 -17
  51. {stackport-0.1.4 → stackport-0.1.6}/LICENSE +0 -0
  52. {stackport-0.1.4 → stackport-0.1.6}/MANIFEST.in +0 -0
  53. {stackport-0.1.4 → stackport-0.1.6}/backend/__init__.py +0 -0
  54. {stackport-0.1.4 → stackport-0.1.6}/backend/aws_client.py +0 -0
  55. {stackport-0.1.4 → stackport-0.1.6}/backend/cache.py +0 -0
  56. {stackport-0.1.4 → stackport-0.1.6}/backend/routes/__init__.py +0 -0
  57. {stackport-0.1.4 → stackport-0.1.6}/backend/routes/dynamodb.py +0 -0
  58. {stackport-0.1.4 → stackport-0.1.6}/backend/routes/ec2.py +0 -0
  59. {stackport-0.1.4 → stackport-0.1.6}/backend/routes/iam.py +0 -0
  60. {stackport-0.1.4 → stackport-0.1.6}/backend/routes/lambda_svc.py +0 -0
  61. {stackport-0.1.4 → stackport-0.1.6}/backend/routes/logs.py +0 -0
  62. {stackport-0.1.4 → stackport-0.1.6}/backend/routes/resources.py +0 -0
  63. {stackport-0.1.4 → stackport-0.1.6}/backend/routes/s3.py +0 -0
  64. {stackport-0.1.4 → stackport-0.1.6}/backend/routes/sqs.py +0 -0
  65. {stackport-0.1.4 → stackport-0.1.6}/setup.cfg +0 -0
  66. {stackport-0.1.4 → stackport-0.1.6}/stackport.egg-info/dependency_links.txt +0 -0
  67. {stackport-0.1.4 → stackport-0.1.6}/stackport.egg-info/entry_points.txt +0 -0
  68. {stackport-0.1.4 → stackport-0.1.6}/stackport.egg-info/requires.txt +0 -0
  69. {stackport-0.1.4 → stackport-0.1.6}/stackport.egg-info/top_level.txt +0 -0
  70. {stackport-0.1.4 → stackport-0.1.6}/tests/test_cache.py +0 -0
  71. {stackport-0.1.4 → stackport-0.1.6}/tests/test_client.py +0 -0
  72. {stackport-0.1.4 → stackport-0.1.6}/tests/test_config.py +0 -0
  73. {stackport-0.1.4 → stackport-0.1.6}/tests/test_dynamodb_routes.py +0 -0
  74. {stackport-0.1.4 → stackport-0.1.6}/tests/test_ec2_routes.py +0 -0
  75. {stackport-0.1.4 → stackport-0.1.6}/tests/test_iam_routes.py +0 -0
  76. {stackport-0.1.4 → stackport-0.1.6}/tests/test_lambda_routes.py +0 -0
  77. {stackport-0.1.4 → stackport-0.1.6}/tests/test_logs_routes.py +0 -0
  78. {stackport-0.1.4 → stackport-0.1.6}/tests/test_registries.py +0 -0
  79. {stackport-0.1.4 → stackport-0.1.6}/tests/test_sqs_routes.py +0 -0
  80. {stackport-0.1.4 → stackport-0.1.6}/ui/dist/favicon.png +0 -0
  81. {stackport-0.1.4 → stackport-0.1.6}/ui/dist/favicon.svg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stackport
3
- Version: 0.1.4
3
+ Version: 0.1.6
4
4
  Summary: Universal AWS resource browser for local emulators
5
5
  Author: Davi Reis Vieira
6
6
  License: MIT
@@ -121,6 +121,7 @@ AWS_ENDPOINT_URL=http://my-emulator:4566 stackport
121
121
  | `AWS_SECRET_ACCESS_KEY` | `test` | AWS secret key |
122
122
  | `STACKPORT_PORT` | `8080` | StackPort server port |
123
123
  | `STACKPORT_SERVICES` | *(35 services)* | Comma-separated services to probe |
124
+ | `LOG_LEVEL` | `INFO` | Python log level (DEBUG shows healthcheck logs) |
124
125
 
125
126
  ## Supported Services (35)
126
127
 
@@ -89,6 +89,7 @@ AWS_ENDPOINT_URL=http://my-emulator:4566 stackport
89
89
  | `AWS_SECRET_ACCESS_KEY` | `test` | AWS secret key |
90
90
  | `STACKPORT_PORT` | `8080` | StackPort server port |
91
91
  | `STACKPORT_SERVICES` | *(35 services)* | Comma-separated services to probe |
92
+ | `LOG_LEVEL` | `INFO` | Python log level (DEBUG shows healthcheck logs) |
92
93
 
93
94
  ## Supported Services (35)
94
95
 
@@ -12,3 +12,4 @@ STACKPORT_SERVICES: str = os.environ.get(
12
12
  "ecr,elasticache,glue,athena,apigateway,firehose,cognito-idp,cognito-identity,"
13
13
  "elasticmapreduce,elasticloadbalancing,elasticfilesystem,cloudfront,appsync",
14
14
  )
15
+ LOG_LEVEL: str = os.environ.get("LOG_LEVEL", "INFO").upper()
@@ -7,15 +7,29 @@ from fastapi.middleware.cors import CORSMiddleware
7
7
  from fastapi.responses import FileResponse
8
8
  from fastapi.staticfiles import StaticFiles
9
9
 
10
- from backend.config import STACKPORT_PORT
10
+ from backend.config import LOG_LEVEL, STACKPORT_PORT
11
11
  from backend.routes import dynamodb, ec2, iam, lambda_svc, logs, resources, s3, sqs, stats
12
12
 
13
+
14
+ class HealthcheckFilter(logging.Filter):
15
+ """Suppress healthcheck access logs unless LOG_LEVEL is DEBUG."""
16
+
17
+ def filter(self, record: logging.LogRecord) -> bool:
18
+ if getattr(logging, LOG_LEVEL, logging.INFO) <= logging.DEBUG:
19
+ return True
20
+ message = record.getMessage()
21
+ return "/health" not in message
22
+
23
+
13
24
  logging.basicConfig(
14
- level=logging.INFO,
25
+ level=LOG_LEVEL,
15
26
  format="%(asctime)s %(name)s %(levelname)s %(message)s",
16
27
  )
17
28
  logger = logging.getLogger(__name__)
18
29
 
30
+ # Suppress noisy healthcheck access logs at non-DEBUG levels
31
+ logging.getLogger("uvicorn.access").addFilter(HealthcheckFilter())
32
+
19
33
  app = FastAPI(title="StackPort", docs_url="/api/docs")
20
34
 
21
35
  app.add_middleware(
@@ -51,7 +65,7 @@ if os.path.isdir(ui_dist):
51
65
 
52
66
 
53
67
  def cli():
54
- uvicorn.run("backend.main:app", host="0.0.0.0", port=STACKPORT_PORT, reload=False)
68
+ uvicorn.run("backend.main:app", host="0.0.0.0", port=STACKPORT_PORT, log_level=LOG_LEVEL.lower(), reload=False)
55
69
 
56
70
 
57
71
  if __name__ == "__main__":
@@ -1,3 +1,4 @@
1
+ import importlib.metadata
1
2
  import logging
2
3
  import time
3
4
  from concurrent.futures import ThreadPoolExecutor, as_completed
@@ -8,7 +9,7 @@ from backend.aws_client import get_client
8
9
 
9
10
  logger = logging.getLogger(__name__)
10
11
  from backend.cache import cache
11
- from backend.config import STACKPORT_SERVICES
12
+ from backend.config import AWS_ENDPOINT_URL, AWS_REGION, STACKPORT_SERVICES
12
13
 
13
14
  router = APIRouter()
14
15
 
@@ -83,7 +84,19 @@ _start_time = time.time()
83
84
 
84
85
  @router.get("/health")
85
86
  def health():
86
- return {"status": "ok", "uptime_seconds": round(time.time() - _start_time, 1)}
87
+ try:
88
+ version = importlib.metadata.version("stackport")
89
+ except importlib.metadata.PackageNotFoundError:
90
+ version = "dev"
91
+ enabled = [s.strip() for s in STACKPORT_SERVICES.split(",") if s.strip()]
92
+ return {
93
+ "status": "ok",
94
+ "version": version,
95
+ "uptime_seconds": round(time.time() - _start_time, 1),
96
+ "endpoint_url": AWS_ENDPOINT_URL,
97
+ "region": AWS_REGION,
98
+ "services_count": len(enabled),
99
+ }
87
100
 
88
101
 
89
102
  # Some APIs require extra parameters to call
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "stackport"
3
- version = "0.1.4"
3
+ version = "0.1.6"
4
4
  description = "Universal AWS resource browser for local emulators"
5
5
  readme = "README.md"
6
6
  license = {text = "MIT"}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stackport
3
- Version: 0.1.4
3
+ Version: 0.1.6
4
4
  Summary: Universal AWS resource browser for local emulators
5
5
  Author: Davi Reis Vieira
6
6
  License: MIT
@@ -121,6 +121,7 @@ AWS_ENDPOINT_URL=http://my-emulator:4566 stackport
121
121
  | `AWS_SECRET_ACCESS_KEY` | `test` | AWS secret key |
122
122
  | `STACKPORT_PORT` | `8080` | StackPort server port |
123
123
  | `STACKPORT_SERVICES` | *(35 services)* | Comma-separated services to probe |
124
+ | `LOG_LEVEL` | `INFO` | Python log level (DEBUG shows healthcheck logs) |
124
125
 
125
126
  ## Supported Services (35)
126
127
 
@@ -0,0 +1,114 @@
1
+ LICENSE
2
+ MANIFEST.in
3
+ README.md
4
+ pyproject.toml
5
+ backend/__init__.py
6
+ backend/aws_client.py
7
+ backend/cache.py
8
+ backend/config.py
9
+ backend/main.py
10
+ backend/../ui/dist/favicon.png
11
+ backend/../ui/dist/favicon.svg
12
+ backend/../ui/dist/index.html
13
+ backend/../ui/dist/assets/index-DI-V3ZCb.js
14
+ backend/../ui/dist/assets/index-DM3oKaVN.css
15
+ backend/../ui/dist/aws-icons/acm.svg
16
+ backend/../ui/dist/aws-icons/apigateway.svg
17
+ backend/../ui/dist/aws-icons/appsync.svg
18
+ backend/../ui/dist/aws-icons/athena.svg
19
+ backend/../ui/dist/aws-icons/cloudformation.svg
20
+ backend/../ui/dist/aws-icons/cloudfront.svg
21
+ backend/../ui/dist/aws-icons/cognito-idp.svg
22
+ backend/../ui/dist/aws-icons/dynamodb.svg
23
+ backend/../ui/dist/aws-icons/ec2.svg
24
+ backend/../ui/dist/aws-icons/ecr.svg
25
+ backend/../ui/dist/aws-icons/ecs.svg
26
+ backend/../ui/dist/aws-icons/elasticache.svg
27
+ backend/../ui/dist/aws-icons/elasticfilesystem.svg
28
+ backend/../ui/dist/aws-icons/elasticloadbalancing.svg
29
+ backend/../ui/dist/aws-icons/elasticmapreduce.svg
30
+ backend/../ui/dist/aws-icons/events.svg
31
+ backend/../ui/dist/aws-icons/firehose.svg
32
+ backend/../ui/dist/aws-icons/glue.svg
33
+ backend/../ui/dist/aws-icons/iam.svg
34
+ backend/../ui/dist/aws-icons/kinesis.svg
35
+ backend/../ui/dist/aws-icons/kms.svg
36
+ backend/../ui/dist/aws-icons/lambda.svg
37
+ backend/../ui/dist/aws-icons/logs.svg
38
+ backend/../ui/dist/aws-icons/monitoring.svg
39
+ backend/../ui/dist/aws-icons/rds.svg
40
+ backend/../ui/dist/aws-icons/route53.svg
41
+ backend/../ui/dist/aws-icons/s3.svg
42
+ backend/../ui/dist/aws-icons/secretsmanager.svg
43
+ backend/../ui/dist/aws-icons/ses.svg
44
+ backend/../ui/dist/aws-icons/sns.svg
45
+ backend/../ui/dist/aws-icons/sqs.svg
46
+ backend/../ui/dist/aws-icons/ssm.svg
47
+ backend/../ui/dist/aws-icons/stepfunctions.svg
48
+ backend/../ui/dist/aws-icons/wafv2.svg
49
+ backend/routes/__init__.py
50
+ backend/routes/dynamodb.py
51
+ backend/routes/ec2.py
52
+ backend/routes/iam.py
53
+ backend/routes/lambda_svc.py
54
+ backend/routes/logs.py
55
+ backend/routes/resources.py
56
+ backend/routes/s3.py
57
+ backend/routes/sqs.py
58
+ backend/routes/stats.py
59
+ stackport.egg-info/PKG-INFO
60
+ stackport.egg-info/SOURCES.txt
61
+ stackport.egg-info/dependency_links.txt
62
+ stackport.egg-info/entry_points.txt
63
+ stackport.egg-info/requires.txt
64
+ stackport.egg-info/top_level.txt
65
+ tests/test_cache.py
66
+ tests/test_client.py
67
+ tests/test_config.py
68
+ tests/test_dynamodb_routes.py
69
+ tests/test_ec2_routes.py
70
+ tests/test_iam_routes.py
71
+ tests/test_lambda_routes.py
72
+ tests/test_logs_routes.py
73
+ tests/test_registries.py
74
+ tests/test_routes.py
75
+ tests/test_sqs_routes.py
76
+ ui/dist/favicon.png
77
+ ui/dist/favicon.svg
78
+ ui/dist/index.html
79
+ ui/dist/assets/index-DI-V3ZCb.js
80
+ ui/dist/assets/index-DM3oKaVN.css
81
+ ui/dist/aws-icons/acm.svg
82
+ ui/dist/aws-icons/apigateway.svg
83
+ ui/dist/aws-icons/appsync.svg
84
+ ui/dist/aws-icons/athena.svg
85
+ ui/dist/aws-icons/cloudformation.svg
86
+ ui/dist/aws-icons/cloudfront.svg
87
+ ui/dist/aws-icons/cognito-idp.svg
88
+ ui/dist/aws-icons/dynamodb.svg
89
+ ui/dist/aws-icons/ec2.svg
90
+ ui/dist/aws-icons/ecr.svg
91
+ ui/dist/aws-icons/ecs.svg
92
+ ui/dist/aws-icons/elasticache.svg
93
+ ui/dist/aws-icons/elasticfilesystem.svg
94
+ ui/dist/aws-icons/elasticloadbalancing.svg
95
+ ui/dist/aws-icons/elasticmapreduce.svg
96
+ ui/dist/aws-icons/events.svg
97
+ ui/dist/aws-icons/firehose.svg
98
+ ui/dist/aws-icons/glue.svg
99
+ ui/dist/aws-icons/iam.svg
100
+ ui/dist/aws-icons/kinesis.svg
101
+ ui/dist/aws-icons/kms.svg
102
+ ui/dist/aws-icons/lambda.svg
103
+ ui/dist/aws-icons/logs.svg
104
+ ui/dist/aws-icons/monitoring.svg
105
+ ui/dist/aws-icons/rds.svg
106
+ ui/dist/aws-icons/route53.svg
107
+ ui/dist/aws-icons/s3.svg
108
+ ui/dist/aws-icons/secretsmanager.svg
109
+ ui/dist/aws-icons/ses.svg
110
+ ui/dist/aws-icons/sns.svg
111
+ ui/dist/aws-icons/sqs.svg
112
+ ui/dist/aws-icons/ssm.svg
113
+ ui/dist/aws-icons/stepfunctions.svg
114
+ ui/dist/aws-icons/wafv2.svg
@@ -23,6 +23,12 @@ class TestHealth:
23
23
  assert data["status"] == "ok"
24
24
  assert "uptime_seconds" in data
25
25
  assert isinstance(data["uptime_seconds"], (int, float))
26
+ assert "version" in data
27
+ assert isinstance(data["version"], str)
28
+ assert "endpoint_url" in data
29
+ assert "region" in data
30
+ assert "services_count" in data
31
+ assert isinstance(data["services_count"], int)
26
32
 
27
33
 
28
34
  class TestStats: