{"id":17667060,"url":"https://github.com/francescosaveriozuppichini/linkedin_python","last_synced_at":"2025-06-10T14:34:09.723Z","repository":{"id":161501186,"uuid":"635793147","full_name":"FrancescoSaverioZuppichini/linkedin_python","owner":"FrancescoSaverioZuppichini","description":"Python package to create posts on LinkedIn","archived":false,"fork":false,"pushed_at":"2023-09-06T20:29:47.000Z","size":18,"stargazers_count":45,"open_issues_count":3,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-07T23:08:33.833Z","etag":null,"topics":["linkedin","programming","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FrancescoSaverioZuppichini.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-03T13:17:42.000Z","updated_at":"2025-05-02T15:05:35.000Z","dependencies_parsed_at":"2024-03-16T13:00:30.834Z","dependency_job_id":null,"html_url":"https://github.com/FrancescoSaverioZuppichini/linkedin_python","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrancescoSaverioZuppichini%2Flinkedin_python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrancescoSaverioZuppichini%2Flinkedin_python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrancescoSaverioZuppichini%2Flinkedin_python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrancescoSaverioZuppichini%2Flinkedin_python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FrancescoSaverioZuppichini","download_url":"https://codeload.github.com/FrancescoSaverioZuppichini/linkedin_python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252968118,"owners_count":21833252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linkedin","programming","python"],"created_at":"2024-10-23T21:43:43.796Z","updated_at":"2025-05-07T23:08:38.385Z","avatar_url":"https://github.com/FrancescoSaverioZuppichini.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LinkedIn Python 💙🐍\nThis package allows you to easily create post on LinkedIn using python, it follow LinkedIn v2 APIs.\n\nThe official LinkedIn doc is [here](https://learn.microsoft.com/en-gb/linkedin/consumer/integrations/self-serve/share-on-linkedin)\n\n## Installation\n\nYou can install the package using pip\n\n```\npip install linked_python\n```\n\n## Getting Started\n\n### Obtain a token\n\nYou need to obtain a token, is not an easy process since you need to create a LinkedIn app, please follow this [youtube tutorial](https://youtu.be/YJoof1kX_kQ)\n\nThen, run \n\n```bash\nexport LINKEDIN_TOKEN=\u003cYOUR_TOKEN\u003e\n```\n\nin your current shell\n\n### Creating a Post\nTo create a post, you can simple use the `User` class.\n\n```python\nfrom linkedin_python import User\n\nuser = User()\nres = user.create_post(\n    \"Post content\",\n    images=[\n        (\"/home/zuppif/Documents/LinkedInGPT/grogu.jpg\", \"image description\"),\n        (\"/home/zuppif/Documents/LinkedInGPT/grogu_2.png\", \"image description\"),\n    ],\n)\n```\n\nThis will create a post with two images.\n\n## Contribution\n\nWe welcome all the contributions, here some dev specific stuff. To contribute\n\n```bash\ngit clone git@github.com:FrancescoSaverioZuppichini/linkedin_python.git\ncd linkedin_python \u0026\u0026 pip install -e \".[dev]\"\n```\n\nThis will install of the dev packages, e.g. `black` and `isort`\n\n### Code Quality 🧹\n\nWe provide two handy commands inside the `Makefile`, namely:\n\n- `make style` to format the code\n- `make check_code_quality` to check code quality (PEP8 basically)\n\nSo far, **there is no types checking with mypy**.\n\n### Tests 🧪\n\n[`pytests`](https://docs.pytest.org/en/7.1.x/) is used to run our tests.\n\n### Publish on PyPi 🚀\n\n**Important**: Before publishing, edit `__version__` in [src/__init__](/src/__init__.py) to match the wanted new version.\n\nWe use [`twine`](https://twine.readthedocs.io/en/stable/) to make our life easier. You can publish by using\n\n```\nexport PYPI_USERNAME=\"you_username\"\nexport PYPI_PASSWORD=\"your_password\"\nexport PYPI_TEST_PASSWORD=\"your_password_for_test_pypi\"\nmake publish -e PYPI_USERNAME=$PYPI_USERNAME -e PYPI_PASSWORD=$PYPI_PASSWORD -e PYPI_TEST_PASSWORD=$PYPI_TEST_PASSWORD\n```\n\nYou can also use token for auth, see [pypi doc](https://pypi.org/help/#apitoken). In that case,\n\n```\nexport PYPI_USERNAME=\"__token__\"\nexport PYPI_PASSWORD=\"your_token\"\nexport PYPI_TEST_PASSWORD=\"your_token_for_test_pypi\"\nmake publish -e PYPI_USERNAME=$PYPI_USERNAME -e PYPI_PASSWORD=$PYPI_PASSWORD -e PYPI_TEST_PASSWORD=$PYPI_TEST_PASSWORD\n```\n\n**Note**: We will try to push to [test pypi](https://test.pypi.org/) before pushing to pypi, to assert everything will work\n\n### CI/CD 🤖\n\nWe use [GitHub actions](https://github.com/features/actions) to automatically run tests and check code quality when a new PR is done on `main`.\n\nOn any pull request, we will check the code quality and tests.\n\nWhen a new release is created, we will try to push the new code to PyPi. We use [`twine`](https://twine.readthedocs.io/en/stable/) to make our life easier. \n\nThe **correct steps** to create a new realease are the following:\n- edit `__version__` in [src/__init__](/src/__init__.py) to match the wanted new version.\n- create a new [`tag`](https://git-scm.com/docs/git-tag) with the release name, e.g. `git tag v0.0.1 \u0026\u0026 git push origin v0.0.1` or from the GitHub UI.\n- create a new release from GitHub UI\n\nThe CI will run when you create the new release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrancescosaveriozuppichini%2Flinkedin_python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrancescosaveriozuppichini%2Flinkedin_python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrancescosaveriozuppichini%2Flinkedin_python/lists"}