Skip to content

Commit a4d9b2b

Browse files
committed
fix: use the proper aptabase api urls
1 parent e15b73a commit a4d9b2b

File tree

10 files changed

+274
-55
lines changed

10 files changed

+274
-55
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "aptabase"
3-
version = "0.0.1"
3+
version = "0.0.2"
44
description = "Python SDK for Aptabase analytics"
55
readme = "README.md"
66
requires-python = ">=3.11"

samples/textual-aptabase-counter/README.md renamed to samples/textual-counter/README.md

Lines changed: 17 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ This is a simple counter app that:
3535
uv pip install textual aptabase
3636

3737
# Run the app
38-
uv run main.py
38+
uv run counter.py
3939
```
4040

4141
#### Using pip
@@ -49,7 +49,7 @@ source venv/bin/activate # On Windows: venv\Scripts\activate
4949
pip install textual aptabase
5050

5151
# Run the app
52-
python main.py
52+
python counter.py
5353
```
5454

5555
#### Using pyproject.toml
@@ -67,7 +67,7 @@ Before running, you need to set your Aptabase app key:
6767
1. Sign up at [aptabase.com](https://aptabase.com/)
6868
2. Create a new app
6969
3. Copy your app key (format: `A-EU-XXXXXXXXXX` or `A-US-XXXXXXXXXX`)
70-
4. Update the key in `simple_counter.py`:
70+
4. Update the key in `counter.py`:
7171

7272
```python
7373
# Replace with your actual Aptabase app key
@@ -120,7 +120,7 @@ Sent when the app exits.
120120

121121
## 🎮 Usage
122122

123-
1. **Start the app**: Run `python simple_counter.py`
123+
1. **Start the app**: Run `python main.py`
124124
2. **Click the button**: Press "Click Me!" to increment (or press `Enter` when focused)
125125
3. **Reset**: Click "Reset" to set counter back to zero
126126
4. **Quit**: Press `q` or `Ctrl+C`
@@ -244,55 +244,31 @@ pip install textual aptabase
244244
python --version # Must be 3.11+
245245
```
246246

247-
## 📚 Learn More
248-
249-
### Next Steps
250-
251-
Once you're comfortable with this simple example, check out:
252-
253-
1. **textual_aptabase_demo.py** - Full dashboard with tabs, forms, and real-time stats
254-
2. **advanced_patterns.py** - User identification, error tracking, performance monitoring
247+
### Events don't show
255248

256-
### Resources
249+
Make sure to check the Debug-mode dashboard (not Release-mode)
257250

258-
- **Aptabase**: [https://aptabase.com/docs](https://aptabase.com/docs)
259-
- **Aptabase Python SDK**: [https://github.com/aptabase/aptabase-py](https://github.com/aptabase/aptabase-py)
260-
- **Textual**: [https://textual.textualize.io/](https://textual.textualize.io/)
261-
- **Textual Tutorial**: [https://textual.textualize.io/tutorial/](https://textual.textualize.io/tutorial/)
262-
263-
## 🔐 Privacy
251+
## 📚 Learn More
264252

265-
Aptabase is privacy-first analytics:
266-
- ✅ No personal data collected
267-
- ✅ No IP addresses stored
268-
- ✅ No cookies or tracking
269-
- ✅ GDPR compliant
270-
- ✅ Open source
253+
## Resources
271254

272-
This example only tracks:
273-
- Counter values (anonymous)
274-
- Button click events
275-
- Session duration
276-
- App lifecycle events
255+
- [Aptabase Documentation](https://aptabase.com/docs)
256+
- [Textual Documentation](https://textual.textualize.io/)
257+
- [Aptabase Python SDK](https://github.com/aptabase/aptabase-python)
277258

278-
## 📄 License
259+
## License
279260

280261
MIT License - feel free to use this as a starting point for your own projects!
281262

282-
## 🤝 Contributing
263+
## Contributing
283264

284-
This is a simple example/demo. Feel free to:
285-
- Fork and modify
286-
- Use in your own projects
287-
- Share improvements
265+
This is a demo app. Feel free to fork and modify for your needs!
288266

289-
## Questions?
267+
## Questions?
290268

291-
- **Aptabase Support**: [https://aptabase.com/](https://aptabase.com/)
292-
- **Textual Discord**: [https://discord.gg/Enf6Z3qhVr](https://discord.gg/Enf6Z3qhVr)
269+
- Aptabase: [https://aptabase.com/](https://aptabase.com/)
270+
- Textual: [https://textual.textualize.io/](https://textual.textualize.io/)
293271

294272
---
295273

296-
**Happy coding!** 🚀
297-
298274
Built with ❤️ using [Textual](https://textual.textualize.io/) and [Aptabase](https://aptabase.com/)
Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ class CounterApp(App):
3131
}
3232
"""
3333

34+
BINDINGS = [
35+
("q", "quit", "Quit"),
36+
("ctrl+c", "quit", "Quit"),
37+
]
38+
3439
def __init__(self, app_key: str = "A-EU-0000000000"):
3540
super().__init__()
3641
self.app_key = app_key
@@ -87,8 +92,12 @@ async def on_button_pressed(self, event: Button.Pressed) -> None:
8792
counter_widget = self.query_one("#counter", Static)
8893
counter_widget.update(f"[bold cyan]Count: {self.counter}[/bold cyan]")
8994

90-
91-
if __name__ == "__main__":
95+
def main():
96+
"""Run the counter app"""
9297
# Replace with your Aptabase app key
9398
app = CounterApp(app_key="A-EU-0000000000")
94-
app.run()
99+
app.run()
100+
101+
102+
if __name__ == "__main__":
103+
main()

samples/textual-aptabase-counter/pyproject.toml renamed to samples/textual-counter/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ description = "A simple counter app demonstrating Aptabase analytics integration
55
authors = [
66
{name = "Your Name", email = "your.email@example.com"}
77
]
8-
readme = "README_COUNTER.md"
8+
readme = "README.md"
99
requires-python = ">=3.11"
1010
dependencies = [
1111
"textual>=6.7.1",
12-
"aptabase>=0.0.1",
12+
"aptabase>=0.0.2",
1313
]
1414
license = {text = "MIT"}
1515
keywords = ["textual", "tui", "analytics", "aptabase", "counter"]
@@ -30,7 +30,7 @@ Repository = "https://github.com/yourusername/textual-aptabase-counter"
3030
"Bug Tracker" = "https://github.com/yourusername/textual-aptabase-counter/issues"
3131

3232
[project.scripts]
33-
counter = "main:main"
33+
counter = "counter:main"
3434

3535
[build-system]
3636
requires = ["hatchling"]

samples/textual-counter/uv.lock

Lines changed: 214 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/textual-aptabase-dashboard/README.md renamed to samples/textual-dashboard/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ pip install
223223
# Or with uv
224224
uv sync
225225
```
226+
### Events don't show
227+
228+
Make sure to check the Debug-mode dashboard (not Release-mode)
226229

227230
## Resources
228231

File renamed without changes.

0 commit comments

Comments
 (0)