diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f3df33d..929ad05 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,9 +43,12 @@ jobs: - name: Verify version matches tag # Belt-and-suspenders — fail loudly if the tag and the package # version disagree, instead of shipping a confusing release. + # Note: PEP 625 normalises hyphens in distribution names to + # underscores in built filenames, so `socialapis-sdk` becomes + # `socialapis_sdk-X.Y.Z.tar.gz` on disk. run: | tag="${GITHUB_REF_NAME#v}" - file_version=$(ls dist/socialapis-*.tar.gz | sed -E 's|.*socialapis-([^-]+)\.tar\.gz|\1|') + file_version=$(ls dist/socialapis_sdk-*.tar.gz | sed -E 's|.*socialapis_sdk-([^-]+)\.tar\.gz|\1|') if [ "$tag" != "$file_version" ]; then echo "::error::Tag ${tag} does not match package version ${file_version}" exit 1 @@ -62,7 +65,7 @@ jobs: runs-on: ubuntu-latest environment: name: pypi - url: https://pypi.org/project/socialapis/ + url: https://pypi.org/project/socialapis-sdk/ permissions: id-token: write # OIDC token for PyPI Trusted Publishing steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 84c8388..9246408 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 First public release. Full coverage of the SocialAPIs.io public REST surface in one shot — no v0.2/v0.3 follow-ups required for core endpoints. +> **PyPI distribution name**: `socialapis-sdk` (install with +> `pip install socialapis-sdk`). The Python import path is the +> shorter `socialapis` (`from socialapis import Facebook`) — those +> two are independent on PyPI. + ### Added — Facebook namespace (`Facebook` / `AsyncFacebook`) **Pages**: `get_page_id`, `get_page_info`, `get_page_posts`, `get_page_reels`, diff --git a/README.md b/README.md index 56efcce..35ea52c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # socialapis — Python SDK for Facebook + Instagram public data -[![PyPI](https://img.shields.io/pypi/v/socialapis.svg)](https://pypi.org/project/socialapis/) -[![Python versions](https://img.shields.io/pypi/pyversions/socialapis.svg)](https://pypi.org/project/socialapis/) +[![PyPI](https://img.shields.io/pypi/v/socialapis-sdk.svg)](https://pypi.org/project/socialapis-sdk/) +[![Python versions](https://img.shields.io/pypi/pyversions/socialapis-sdk.svg)](https://pypi.org/project/socialapis-sdk/) [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE) The modern alternative to [`kevinzg/facebook-scraper`](https://github.com/kevinzg/facebook-scraper) @@ -11,7 +11,7 @@ review, no scraper maintenance**. Powered by hosted infrastructure at [socialapis.io](https://socialapis.io). ```bash -pip install socialapis +pip install socialapis-sdk ``` ```python diff --git a/pyproject.toml b/pyproject.toml index 97797c3..e3a4a4c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,13 @@ build-backend = "hatchling.build" # PACKAGE METADATA # ============================================================================= [project] -name = "socialapis" +# PyPI distribution name. `socialapis` was already taken/squatted on +# PyPI when we tried to register it. `socialapis-sdk` is distinct +# enough to pass PyPI's name-similarity check. The Python IMPORT +# path is unaffected — users still write `from socialapis import ...` +# (the import path comes from the package directory name, not the +# distribution name). +name = "socialapis-sdk" dynamic = ["version"] description = "Python SDK for Facebook and Instagram public data. Drop-in replacement for facebook-scraper. REST + MCP, 200 free API calls/month, no OAuth." readme = "README.md"