{"id":13767238,"url":"https://github.com/a16z/farcaster-py","last_synced_at":"2025-03-18T10:09:18.660Z","repository":{"id":65535106,"uuid":"523186031","full_name":"a16z/farcaster-py","owner":"a16z","description":"A Python SDK for the Farcaster network","archived":false,"fork":false,"pushed_at":"2025-03-10T16:44:26.000Z","size":9983,"stargazers_count":133,"open_issues_count":68,"forks_count":33,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-10T17:42:45.357Z","etag":null,"topics":["api","farcaster","pydantic","python","social"],"latest_commit_sha":null,"homepage":"https://a16z.github.io/farcaster-py/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/a16z.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-10T03:24:21.000Z","updated_at":"2025-03-10T16:44:26.000Z","dependencies_parsed_at":"2024-10-01T18:00:33.435Z","dependency_job_id":"12dfb7d1-6040-4b7d-8981-d9b6f087b5dd","html_url":"https://github.com/a16z/farcaster-py","commit_stats":{"total_commits":339,"total_committers":14,"mean_commits":"24.214285714285715","dds":0.4041297935103245,"last_synced_commit":"68c0b3ede1b43884101c979edd0999c66399ecf4"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a16z%2Ffarcaster-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a16z%2Ffarcaster-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a16z%2Ffarcaster-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a16z%2Ffarcaster-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a16z","download_url":"https://codeload.github.com/a16z/farcaster-py/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244189824,"owners_count":20412991,"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":["api","farcaster","pydantic","python","social"],"created_at":"2024-08-03T16:01:06.505Z","updated_at":"2025-03-18T10:09:18.652Z","avatar_url":"https://github.com/a16z.png","language":"Python","funding_links":[],"categories":["Developer Resources","Uncategorized"],"sub_categories":["Repos","Uncategorized"],"readme":"# farcaster-py\n\n**Note**: This project is not actively maintained, but we welcome external contributions and forks. If you’d like to contribute, please open a PR or fork this repository.\n\n\n\u003cdiv align=\"center\"\u003e\n\n[![Build status](https://github.com/a16z/farcaster-py/workflows/build/badge.svg?branch=main\u0026event=push)](https://github.com/a16z/farcaster-py/actions?query=workflow%3Abuild)\n[![Python Version](https://img.shields.io/pypi/pyversions/farcaster.svg)](https://pypi.org/project/farcaster/)\n[![Dependencies Status](https://img.shields.io/badge/dependencies-up%20to%20date-brightgreen.svg)](https://github.com/a16z/farcaster-py/pulls?utf8=%E2%9C%93\u0026q=is%3Apr%20author%3Aapp%2Fdependabot)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Security: bandit](https://img.shields.io/badge/security-bandit-green.svg)](https://github.com/PyCQA/bandit)\n[![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white)](https://github.com/a16z/farcaster-py/blob/master/.pre-commit-config.yaml)\n[![Semantic Versions](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--versions-e10079.svg)](https://github.com/a16z/farcaster-py/releases)\n[![License](https://img.shields.io/github/license/a16z/farcaster-py)](https://github.com/a16z/farcaster-py/blob/main/LICENSE)\n![Coverage Report](assets/images/coverage.svg)\n[![chat](https://img.shields.io/badge/chat-telegram-blue)](https://t.me/+aW_ucWeBVUZiNThh)\n\nfarcaster-py is a modern Python SDK for the Farcaster protocol\u003cbr\u003e\u003c/br\u003e\n\nFull documentation can be found [here](https://a16z.github.io/farcaster-py)\n\n\u003c/div\u003e\n\n## Installation\n\n```bash\npip install -U farcaster\n```\n\nor install with [Poetry](https://python-poetry.org/):\n\n```bash\npoetry add farcaster\n```\n\n## Usage\n\nThis SDK leverages the Warpcast API. [Warpcast](https://warpcast.com/) is one of many Farcaster [clients](https://github.com/a16z/awesome-farcaster#clients). As more APIs are created and hosted by different clients, these will be added to the SDK.\n\nTo use the Warpcast API you need to have a Farcaster account. We will use the mnemonic or private key of the Farcaster custody account (not your main wallet) to connect to the API.\n\nFirst, save your Farcaster mnemonic or private key to a `.env` file. Now you can initialize the client, and automatically connect to the Farcaster API!\n\n```python\nimport os\nfrom farcaster import Warpcast\nfrom dotenv import load_dotenv # can be installed with `pip install python-dotenv`\n\nload_dotenv()\n\nclient = Warpcast(mnemonic=os.environ.get(\"\u003cMNEMONIC_ENV_VAR\u003e\"))\n\nprint(client.get_healthcheck())\n```\n\n## Examples\n\nGet a cast\n\n```python\nresponse = client.get_cast(\"0x321712dc8eccc5d2be38e38c1ef0c8916c49949a80ffe20ec5752bb23ea4d86f\")\nprint(response.cast.author.username) # \"dwr\"\n```\n\nPublish a cast\n\n```python\nresponse = client.post_cast(text=\"Hello world!\")\nprint(response.cast.hash) # \"0x....\"\n```\n\nGet a user by username\n\n```python\nuser = client.get_user_by_username(\"mason\")\nprint(user.username) # \"mason\"\n```\n\nGet a user's followers using a fid (farcaster ID)\n\n```python\nresponse = client.get_followers(fid=50)\nprint(response.users) # [user1, user2, user3]\n```\n\nStream recent casts\n\n```python\nfor cast in client.stream_casts():\n    if cast:\n        print(cast.text) # \"Hello world!\"\n```\n\nGet users who recently joined Farcaster\n\n```python\nresponse = client.get_recent_users()\nprint(response.users) # [user1, user2, user3]\n```\n\nGet your own user object\n\n```python\nuser = client.get_me()\nprint(user.username) # \"you\"\n```\n\nRecast a cast\n\n```python\nresponse = client.recast(\"0x....\")\nprint(response.cast.hash) # \"0x....\"\n```\n\nand many, many more things. The full specification can be found on the [Reference page](https://a16z.github.io/farcaster-py/reference).\n\n*Please note that support for Python 3.8 is no longer actively maintained. Python 3.9, or 3.10+ are recommended.*\n## 🛡 License\n\n[![License](https://img.shields.io/github/license/a16z/farcaster-py)](https://github.com/a16z/farcaster-py/blob/main/LICENSE)\n\nThis project is licensed under the terms of the `MIT` license. See [LICENSE](https://github.com/a16z/farcaster-py/blob/main/LICENSE) for more details.\n\n## Disclaimer\n\n_This code is being provided as is. No guarantee, representation or warranty is being made, express or implied, as to the safety or correctness of the code. It has not been audited and as such there can be no assurance it will work as intended, and users may experience delays, failures, errors, omissions or loss of transmitted information. Nothing in this repo should be construed as investment advice or legal advice for any particular facts or circumstances and is not meant to replace competent counsel. It is strongly advised for you to contact a reputable attorney in your jurisdiction for any questions or concerns with respect thereto. a16z is not liable for any use of the foregoing, and users should proceed with caution and use at their own risk. See [our disclosures page](https://a16z.com/disclosures) for more info._\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa16z%2Ffarcaster-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa16z%2Ffarcaster-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa16z%2Ffarcaster-py/lists"}