Skip to content

feat: install Telegram-Archive from PyPI as a command and a Python library - #493

Merged
GeiserX merged 12 commits into
mainfrom
feat/pypi-package
Sep 28, 2026
Merged

GeiserX merged 12 commits into
mainfrom
feat/pypi-package

Conversation

@GeiserX

@GeiserX GeiserX commented Sep 28, 2026

Copy link
Copy Markdown
Owner

Telegram-Archive could only run from its Docker images. #492 asks for a PyPI package, so other tools can install it with pip and drive it as a command or from Python.

pip install telegram-archive now gives:

  • the telegram-archive command, with the same subcommands as the image and a new migrate that creates or upgrades the schema;
  • from telegram_archive import Config, TelegramBackup, run_backup for use as a library.

A release tag publishes it to PyPI through trusted publishing. There is no token, and the job refuses a tag that doesn't match the version.

To get there, the src package is now telegram_archive, and the migrations ship inside it. Existing deployments need no change. A small src compatibility package in both images keeps python -m src ..., uvicorn src.web.main:app and the /app/src/web/static wallpaper mount working, and it never loads a second copy of any module. For that reason the compose file and the Docker examples stay on python -m src until the release that bumps the image pins.

A new Package workflow builds the wheel on every pull request. It installs the wheel in a clean environment and runs the command, the API import and migrate against a fresh SQLite database.

Before the first tag publishes, two one-time steps are needed: a pending trusted publisher on PyPI (project telegram-archive, workflow release.yml, environment pypi) and a pypi environment in this repo. Until then only the PyPI job of a release fails. The GitHub release and the images are unaffected.

migrate has no stamping ladder. A SQLite database that another command created first needs alembic stamp head once, and the README says so.

Closes #492

A package named "src" cannot be published to PyPI or imported next to
other projects. The code now lives in telegram_archive/, moved with git mv
so history follows it.

Existing Docker deployments keep working. Both images still ship a small
src/ package that maps every "src.<name>" import to the telegram_archive
module object itself, so "python -m src schedule" and
"uvicorn src.web.main:app" run the same code with the same module state.
The entrypoint accepts both names for the auth check, and the images'
default commands use the new name.
A pip install has no entrypoint script and no repository checkout, so the
schema could only be built by create_all, which leaves the database
unstamped. The Alembic config, env.py and every revision now live in
telegram_archive/, with paths relative to alembic.ini.

"telegram-archive migrate" runs alembic upgrade head for pip installs and
fresh databases. The Docker entrypoint keeps its stamping ladder and now
finds the config through telegram_archive.db.migrations.alembic_config().
The image sets ALEMBIC_CONFIG, so a bare "alembic ..." inside the
container keeps working.

With the top-level alembic/ directory gone, ruff sorts "alembic" as the
third-party package it is, which reorders imports in the migrations and
their tests.
"from telegram_archive import Config, run_backup" followed by
"asyncio.run(run_backup(Config()))" runs one backup of every configured
account, the same path the backup command takes. The names load lazily
through a module __getattr__, so "import telegram_archive" still works in
the viewer image, which has no telethon.
telegram-archive migrate failed with "unable to open database file" when
the data directory did not exist yet. The Docker entrypoint creates it
before migrating and DatabaseManager creates it before opening SQLite;
env.py now does the same, so migrate works as the first command.
The wheel and sdist carry only telegram_archive, with its templates,
static files, alembic.ini, script.py.mako and every migration. The license
is a PEP 639 SPDX expression, which builds on current setuptools without
warnings; the license classifier it replaces had to go.

A new Package workflow builds both on every pull request, checks their
metadata and contents, and installs the wheel in a clean venv to run the
CLI, the Python API import and the migrate command. The release workflow
gains a PyPI job that refuses a tag that does not match the version files
and uploads through trusted publishing, with no API token.
README gains an "Install from PyPI" section with the commands and a short
Python API example, and says Docker stays the main way to run it. The
changelog's Unreleased entry covers the rename, the compatibility package
for "python -m src", the migrate command and PyPI publishing.
…ity package

The migrations now live under telegram_archive/, which the entry above
already covers.
…pace

migrate imported only the models, so it never loaded .env and migrated
/data/backups while every other command used the .env path. env.py now
imports config, which loads it.

version_locations had no path_separator, so Alembic split it on spaces
and an install path with a space found no revisions: migrate left an
empty alembic_version and reported success. The line is gone; the
default <script_location>/versions is never split.
A wallpaper mounted at /app/src/web/static/<file>, the documented path
before the rename, silently 404d because the viewer serves only
telegram_archive/web/static. The viewer image links the old path to it.
…ned schema

README.md is the PyPI long description, so repository-relative images
and doc links break there. The Python API example now sets BACKUP_PATH,
and the migrate note says the other commands build a schema migrate
cannot adopt later, instead of claiming they create none.
…ew name is released

The compose file, init scripts and README pin the 8.16.1 image, which has no telegram_archive module. python -m src and the /app/src wallpaper path work on that image and on every later one through the compatibility package, so they stay until the release that bumps the pins.
@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 254 files, which is 154 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: Repository: GeiserX/Telegram-Archive/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: e5810056-5ce8-4c4a-b399-70431ea09120

📥 Commits

Reviewing files that changed from the base of the PR and between 62341a2 and c6698f0.

⛔ Files ignored due to path filters (57)
  • telegram_archive/alembic/versions/20241218_0001_001_initial_schema.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260116_002_add_chat_date_index.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260117_003_add_push_subscriptions.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260125_004_add_is_pinned_column.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260128_005_v6_schema_normalization.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260206_006_add_topics_folders_archived.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260227_007_add_viewer_accounts.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260227_008_add_push_subscription_user.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260305_009_add_viewer_sessions.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260310_010_add_tokens_settings_no_download.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260503_011_add_media_content_hash.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260523_012_add_media_chat_type_index.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260524_013_fix_media_file_paths.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260625_014_add_message_soft_delete.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260626_015_add_message_versions.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260714_016_add_media_download_attempts.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260715_017_add_messages_chat_id_id_index.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260718_018_add_reaction_removed_at.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260719_019_delete_phantom_chat_action_rows.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260727_020_add_message_sender_name.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260815_021_align_schema_with_orm.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260815_022_multi_account_keys.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260816_023_add_message_text_trgm_index.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260818_024_restore_missing_declared_indexes.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260819_025_drop_redundant_chat_id_index.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260821_026_add_media_gallery_index.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260822_027_widen_topic_index_with_date.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260823_028_full_text_search.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260923_029_add_chat_avatar_photo_id.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260923_030_add_media_skip_reason.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260924_031_add_avatar_history.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260925_032_add_media_transcripts.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/alembic/versions/20260927_033_add_transcript_options_tag.py is excluded by !telegram_archive/alembic/versions/**
  • telegram_archive/web/static/apple-touch-icon.png is excluded by !**/*.png
  • telegram_archive/web/static/favicon.ico is excluded by !**/*.ico
  • telegram_archive/web/static/icon-192.png is excluded by !**/*.png
  • telegram_archive/web/static/icon-512.png is excluded by !**/*.png
  • telegram_archive/web/static/vendor/flatpickr-4.6.13.min.css is excluded by !**/*.min.css
  • telegram_archive/web/static/vendor/flatpickr-4.6.13.min.js is excluded by !**/*.min.js
  • telegram_archive/web/static/vendor/fontawesome/css/all.min.css is excluded by !**/*.min.css
  • telegram_archive/web/static/vendor/fontawesome/webfonts/fa-brands-400.ttf is excluded by !**/*.ttf
  • telegram_archive/web/static/vendor/fontawesome/webfonts/fa-brands-400.woff2 is excluded by !**/*.woff2
  • telegram_archive/web/static/vendor/fontawesome/webfonts/fa-regular-400.ttf is excluded by !**/*.ttf
  • telegram_archive/web/static/vendor/fontawesome/webfonts/fa-regular-400.woff2 is excluded by !**/*.woff2
  • telegram_archive/web/static/vendor/fontawesome/webfonts/fa-solid-900.ttf is excluded by !**/*.ttf
  • telegram_archive/web/static/vendor/fontawesome/webfonts/fa-solid-900.woff2 is excluded by !**/*.woff2
  • telegram_archive/web/static/vendor/fontawesome/webfonts/fa-v4compatibility.ttf is excluded by !**/*.ttf
  • telegram_archive/web/static/vendor/fontawesome/webfonts/fa-v4compatibility.woff2 is excluded by !**/*.woff2
  • telegram_archive/web/static/vendor/fonts/inter-1-UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa0ZL7W0Q5n-wU.woff2 is excluded by !**/*.woff2
  • telegram_archive/web/static/vendor/fonts/inter-2-UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7W0Q5nw.woff2 is excluded by !**/*.woff2
  • telegram_archive/web/static/vendor/fonts/inter-3-UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1pL7W0Q5n-wU.woff2 is excluded by !**/*.woff2
  • telegram_archive/web/static/vendor/fonts/inter-4-UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7W0Q5n-wU.woff2 is excluded by !**/*.woff2
  • telegram_archive/web/static/vendor/fonts/inter-5-UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2JL7W0Q5n-wU.woff2 is excluded by !**/*.woff2
  • telegram_archive/web/static/vendor/fonts/inter-6-UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2ZL7W0Q5n-wU.woff2 is excluded by !**/*.woff2
  • telegram_archive/web/static/vendor/fonts/inter-7-UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2pL7W0Q5n-wU.woff2 is excluded by !**/*.woff2
  • telegram_archive/web/static/vendor/moment-2.29.4.min.js is excluded by !**/*.min.js
  • telegram_archive/web/static/vendor/moment-timezone-with-data-1970-2030-0.5.43.min.js is excluded by !**/*.min.js
📒 Files selected for processing (254)
  • .coderabbit.yaml
  • .github/CODEOWNERS
  • .github/scripts/check_dist.py
  • .github/scripts/package_smoke.sh
  • .github/workflows/codeql.yml
  • .github/workflows/docker-publish-dev.yml
  • .github/workflows/docker-publish-viewer.yml
  • .github/workflows/docker-publish.yml
  • .github/workflows/lint.yml
  • .github/workflows/package.yml
  • .github/workflows/release.yml
  • .github/workflows/tests.yml
  • .pre-commit-config.yaml
  • CLAUDE.md
  • CONTRIBUTING.md
  • Dockerfile
  • Dockerfile.viewer
  • MANIFEST.in
  • README.md
  • docker-compose.yml
  • docs/CHANGELOG.md
  • docs/MERGING-ARCHIVES.md
  • docs/SPACETIMEDB-MODE.md
  • docs/TRANSCRIPTION.md
  • pyproject.toml
  • scripts/auth_noninteractive.py
  • scripts/cleanup_legacy_avatars.py
  • scripts/deduplicate_media.py
  • scripts/detect_albums.py
  • scripts/entrypoint.sh
  • scripts/fix_media_sizes.py
  • scripts/generate_dummy_db.py
  • scripts/healthcheck_backup.py
  • scripts/merge/merge_postgres.sql
  • scripts/merge/merge_sqlite.sql
  • scripts/migrate-sqlite-to-postgres.py
  • scripts/migrate_media_paths.py
  • scripts/normalize_grouped_ids.py
  • scripts/restore_chat.py
  • scripts/update_media_sizes.py
  • src/__init__.py
  • src/__main__.py
  • telegram-archive
  • telegram_archive/__init__.py
  • telegram_archive/__main__.py
  • telegram_archive/alembic.ini
  • telegram_archive/alembic/env.py
  • telegram_archive/alembic/script.py.mako
  • telegram_archive/avatar_utils.py
  • telegram_archive/config.py
  • telegram_archive/connection.py
  • telegram_archive/db/__init__.py
  • telegram_archive/db/adapter.py
  • telegram_archive/db/base.py
  • telegram_archive/db/fts.py
  • telegram_archive/db/migrate.py
  • telegram_archive/db/migrations.py
  • telegram_archive/db/models.py
  • telegram_archive/event_webhook.py
  • telegram_archive/export_backup.py
  • telegram_archive/folder_utils.py
  • telegram_archive/listener.py
  • telegram_archive/media_errors.py
  • telegram_archive/message_utils.py
  • telegram_archive/migrate_shared_media.py
  • telegram_archive/parallel_download.py
  • telegram_archive/realtime.py
  • telegram_archive/repair_media_extensions.py
  • telegram_archive/scheduler.py
  • telegram_archive/setup_auth.py
  • telegram_archive/telegram_backup.py
  • telegram_archive/telegram_import.py
  • telegram_archive/transcription.py
  • telegram_archive/transcription_contract.py
  • telegram_archive/transcription_providers/__init__.py
  • telegram_archive/transcription_providers/assemblyai.py
  • telegram_archive/transcription_providers/deepgram.py
  • telegram_archive/transcription_providers/elevenlabs.py
  • telegram_archive/transcription_providers/openai.py
  • telegram_archive/web/__init__.py
  • telegram_archive/web/main.py
  • telegram_archive/web/media_utils.py
  • telegram_archive/web/push.py
  • telegram_archive/web/static/manifest.json
  • telegram_archive/web/static/sw.js
  • telegram_archive/web/static/vendor/VENDOR-MANIFEST.txt
  • telegram_archive/web/static/vendor/inter.css
  • telegram_archive/web/static/vendor/tailwindcss-play-3.4.17.js
  • telegram_archive/web/static/vendor/vue-3.5.41.global.prod.js
  • telegram_archive/web/templates/index.html
  • telegram_archive/web/thumbnails.py
  • tests/conftest.py
  • tests/test_account_badges.py
  • tests/test_account_fold_followups.py
  • tests/test_account_isolation.py
  • tests/test_account_scoped_metadata.py
  • tests/test_adapter_query_hardening.py
  • tests/test_atomic_download_helpers.py
  • tests/test_avatar_history.py
  • tests/test_avatar_utils.py
  • tests/test_calendar_frontend_behavior.py
  • tests/test_capture_throughput.py
  • tests/test_chat_description_fetch.py
  • tests/test_chat_migration.py
  • tests/test_chat_ref_acl.py
  • tests/test_chat_scope_equivalence.py
  • tests/test_config.py
  • tests/test_config_account_filters.py
  • tests/test_config_bool_vocab.py
  • tests/test_config_extended.py
  • tests/test_connection.py
  • tests/test_connection_heal_race.py
  • tests/test_createall_race.py
  • tests/test_cursor_freeze_exit.py
  • tests/test_database_viewer.py
  • tests/test_db_adapter.py
  • tests/test_db_adapter_real_engine.py
  • tests/test_db_adapter_soft_delete_upsert.py
  • tests/test_db_base.py
  • tests/test_db_init.py
  • tests/test_db_migrate.py
  • tests/test_dedup_match_branch.py
  • tests/test_describe_exception.py
  • tests/test_entity_formatting.py
  • tests/test_entity_rendering_frontend.py
  • tests/test_entrypoint_schema_detection.py
  • tests/test_event_webhook.py
  • tests/test_exception_logs_hide_paths.py
  • tests/test_export_backup.py
  • tests/test_extended_media_kinds.py
  • tests/test_flood_wait_visibility.py
  • tests/test_folder_resolution_integration.py
  • tests/test_folder_utils.py
  • tests/test_frontend_audit_fixes.py
  • tests/test_frontend_bootstrap.py
  • tests/test_full_text_search.py
  • tests/test_gap_fill.py
  • tests/test_general_topic_messages.py
  • tests/test_global_search.py
  • tests/test_graceful_shutdown.py
  • tests/test_hashing_offloop.py
  • tests/test_healthcheck.py
  • tests/test_import_adoption.py
  • tests/test_import_media_addressing.py
  • tests/test_issue_fixes.py
  • tests/test_jump_window_backend.py
  • tests/test_lifespan_restore.py
  • tests/test_link_previews.py
  • tests/test_linkify_escaping.py
  • tests/test_listener.py
  • tests/test_listener_chat_actions.py
  • tests/test_listener_extended.py
  • tests/test_listener_reactions.py
  • tests/test_listener_webhook.py
  • tests/test_log_chat_titles.py
  • tests/test_main_module.py
  • tests/test_media_adapter.py
  • tests/test_media_and_push_hardening.py
  • tests/test_media_download_disposition.py
  • tests/test_media_filename.py
  • tests/test_media_forward_cursor.py
  • tests/test_media_gallery_plan.py
  • tests/test_media_metadata_persistence.py
  • tests/test_media_open_commands.py
  • tests/test_media_page.py
  • tests/test_media_retry_cap.py
  • tests/test_media_row_identity.py
  • tests/test_media_skip_reason.py
  • tests/test_media_symlink_integrity.py
  • tests/test_media_transcripts.py
  • tests/test_media_twins.py
  • tests/test_media_type_filter.py
  • tests/test_media_utils.py
  • tests/test_message_day_counts.py
  • tests/test_messages_page_batching.py
  • tests/test_migrate_command.py
  • tests/test_migration_014.py
  • tests/test_migration_015.py
  • tests/test_migration_016.py
  • tests/test_migration_017.py
  • tests/test_migration_018.py
  • tests/test_migration_019.py
  • tests/test_migration_020.py
  • tests/test_migration_021_hardening.py
  • tests/test_migration_022.py
  • tests/test_migration_024.py
  • tests/test_migration_025.py
  • tests/test_migration_026.py
  • tests/test_migration_027.py
  • tests/test_migration_032.py
  • tests/test_migration_033.py
  • tests/test_migrations_002_006_idempotency.py
  • tests/test_migrations_007_013_idempotency.py
  • tests/test_multi_account_runtime.py
  • tests/test_multi_user_auth.py
  • tests/test_multiaccount_schema.py
  • tests/test_no_account_pii_in_logs.py
  • tests/test_parallel_download.py
  • tests/test_pending_media_type_exclusion.py
  • tests/test_per_account_avatars.py
  • tests/test_poison_message_isolation.py
  • tests/test_pre_generate_thumbnail.py
  • tests/test_proxy_auth.py
  • tests/test_python_api.py
  • tests/test_reaction_resweep.py
  • tests/test_reactions_realtime.py
  • tests/test_realtime.py
  • tests/test_reconnect_before_retry.py
  • tests/test_release_pins.py
  • tests/test_repair_media_extensions.py
  • tests/test_reply_sender.py
  • tests/test_revocation_closes_channels.py
  • tests/test_rich_message.py
  • tests/test_round_video_classification.py
  • tests/test_scheduler.py
  • tests/test_schema_parity.py
  • tests/test_sender_avatars.py
  • tests/test_setup_auth.py
  • tests/test_shared_media_sharding.py
  • tests/test_src_compat.py
  • tests/test_stats_account_scoped.py
  • tests/test_streaming_import.py
  • tests/test_symlink_dedup.py
  • tests/test_tag_search.py
  • tests/test_telegram_backup.py
  • tests/test_telegram_backup_extended.py
  • tests/test_telegram_import.py
  • tests/test_telegram_import_extended.py
  • tests/test_telegram_proxy.py
  • tests/test_template_structure.py
  • tests/test_token_auth_offloop.py
  • tests/test_topics_covering_plan.py
  • tests/test_transcript_consumers.py
  • tests/test_transcript_search.py
  • tests/test_transcription.py
  • tests/test_transcription_bubble.py
  • tests/test_transcription_config.py
  • tests/test_transcription_providers.py
  • tests/test_v720_features.py
  • tests/test_vendored_assets.py
  • tests/test_viewer_acl_hardening.py
  • tests/test_viewer_image_imports.py
  • tests/test_viewer_on_8_0_schema.py
  • tests/test_web_coverage.py
  • tests/test_web_main.py
  • tests/test_web_messages_api.py
  • tests/test_web_push.py
  • tests/test_web_routes.py
  • tests/test_web_thumbnails.py
  • tests/test_webpage_preview_photo.py
  • tests/test_websocket_route.py
  • tests/test_whitelist_archived.py
  • tests/test_ws_caps.py
  • tests/test_youtube_preview_videos.py

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

🐳 Dev images published!

  • drumsergio/telegram-archive:dev
  • drumsergio/telegram-archive-viewer:dev

The dev/test instance will pick up these changes automatically (Portainer GitOps).

To test locally:

docker pull drumsergio/telegram-archive:dev
docker pull drumsergio/telegram-archive-viewer:dev

@codecov

codecov Bot commented Sep 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.76030% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.29%. Comparing base (62341a2) to head (c6698f0).

Files with missing lines Patch % Lines
telegram_archive/__main__.py 92.95% 16 Missing ⚠️
telegram_archive/__init__.py 69.23% 4 Missing ⚠️
telegram_archive/db/migrations.py 75.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #493      +/-   ##
==========================================
- Coverage   94.84%   94.29%   -0.56%     
==========================================
  Files          36       71      +35     
  Lines       14180    15878    +1698     
==========================================
+ Hits        13449    14972    +1523     
- Misses        731      906     +175     
Files with missing lines Coverage Δ
telegram_archive/alembic/env.py 60.56% <100.00%> (ø)
...embic/versions/20241218_0001_001_initial_schema.py 63.63% <ø> (ø)
...embic/versions/20260116_002_add_chat_date_index.py 100.00% <ø> (ø)
...ic/versions/20260117_003_add_push_subscriptions.py 100.00% <ø> (ø)
...mbic/versions/20260125_004_add_is_pinned_column.py 97.05% <ø> (ø)
...c/versions/20260128_005_v6_schema_normalization.py 86.61% <100.00%> (ø)
...rsions/20260206_006_add_topics_folders_archived.py 100.00% <ø> (ø)
...embic/versions/20260227_007_add_viewer_accounts.py 100.00% <ø> (ø)
...ersions/20260227_008_add_push_subscription_user.py 100.00% <ø> (ø)
...embic/versions/20260305_009_add_viewer_sessions.py 100.00% <ø> (ø)
... and 61 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@GeiserX GeiserX mentioned this pull request Sep 28, 2026
1 task done
@GeiserX
GeiserX merged commit 418f333 into main Sep 28, 2026
13 checks passed
@GeiserX
GeiserX deleted the feat/pypi-package branch September 28, 2026 14:19
GeiserX added a commit that referenced this pull request Oct 2, 2026
…brary (#493)

pip install telegram-archive gives the telegram-archive command and an importable package. The source package is telegram_archive, with a src compatibility package kept in the Docker images. Migrations ship inside the package and run with telegram-archive migrate. Releases publish to PyPI through trusted publishing from the release workflow. Docker examples keep the old entrypoint until the release that bumps the image pins.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Publish package to PyPI

1 participant