{"id":13821118,"url":"https://github.com/jeongukjae/pytistory","last_synced_at":"2025-05-16T12:32:34.755Z","repository":{"id":53477709,"uuid":"119679404","full_name":"jeongukjae/pytistory","owner":"jeongukjae","description":"📖 Tistory Blog API Client written in Python.","archived":true,"fork":false,"pushed_at":"2021-03-29T17:03:54.000Z","size":706,"stargazers_count":13,"open_issues_count":8,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T05:55:36.150Z","etag":null,"topics":["api-client","api-wrapper","blogging","python-library","tistory"],"latest_commit_sha":null,"homepage":"","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/jeongukjae.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-31T11:38:44.000Z","updated_at":"2025-03-24T04:03:42.000Z","dependencies_parsed_at":"2022-08-18T00:10:57.763Z","dependency_job_id":null,"html_url":"https://github.com/jeongukjae/pytistory","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeongukjae%2Fpytistory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeongukjae%2Fpytistory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeongukjae%2Fpytistory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeongukjae%2Fpytistory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeongukjae","download_url":"https://codeload.github.com/jeongukjae/pytistory/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254530465,"owners_count":22086618,"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-client","api-wrapper","blogging","python-library","tistory"],"created_at":"2024-08-04T08:01:15.593Z","updated_at":"2025-05-16T12:32:29.746Z","avatar_url":"https://github.com/jeongukjae.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"PyTistory\n=========\n\n.. image:: https://circleci.com/gh/JeongUkJae/pytistory.svg?style=shield\n  :target: https://circleci.com/gh/JeongUkJae/pytistory\n.. image:: https://travis-ci.org/JeongUkJae/pytistory.svg?branch=master\n  :target: https://travis-ci.org/JeongUkJae/pytistory\n.. image:: https://codecov.io/gh/JeongUkJae/pytistory/branch/master/graph/badge.svg\n  :target: https://codecov.io/gh/JeongUkJae/pytistory\n.. image:: https://requires.io/github/JeongUkJae/pytistory/requirements.svg?branch=master\n  :target: https://requires.io/github/JeongUkJae/pytistory/requirements/?branch=master\n.. image:: https://img.shields.io/pypi/v/pytistory.svg\n  :target: https://pypi.org/project/pytistory\n.. image:: https://img.shields.io/pypi/pyversions/pytistory.svg\n  :target: https://pypi.org/project/pytistory\n.. image:: https://img.shields.io/pypi/l/pytistory.svg\n  :target: https://pypi.org/project/pytistory\n.. image:: https://img.shields.io/pypi/status/pytistory.svg\n  :target: https://pypi.org/project/pytistory\n.. image:: https://readthedocs.org/projects/pytistory/badge/?version=latest\n  :target: https://pytistory.readthedocs.io/ko/latest/?badge=latest\n  :alt: Documentation Status\n\nPyTistory는 `티스토리 오픈 API 가이드 \u003chttp://www.tistory.com/guide/api/index\u003e`_ 를 참고하여 Python으로 작성한 티스토리\nAPI 클라이언트입니다. `티스토리 오픈 API 가이드 인증 방식 \u003chttp://www.tistory.com/guide/api/oauth\u003e`_ 중\nClient-side flow 방식에 따라 구현되었습니다. 자세한 사용법은 `PyTistory Documentation \u003chttps://pytistory.readthedocs.io/ko/latest/\u003e`_ 에서\n확인하실 수 있습니다.\n\nInstallation\n------------\n\npytistory는 ``pip``\\ 를 통해 설치할 수 있습니다.\n\n.. code-block:: bash\n\n   $ pip install pytistory\n\n\n사용법\n-------\n\n사용자 인증\n~~~~~~~~~~~\n\n인증정보는 다음과 같은 우선순위를 통해 적용됩니다.\n\n  - 직접 설정하는 ``configure``\\ 함수로 넘어오는 ``access_token``\\인자값\n  - ``configure``\\ 함수로 넘어오는 ``client_id``\\, ``tistory_id``\\, ``tistory_password``\\ 인자값\n  - ``configure``\\ 함수로 넘어오는 ``file_name``\\에서 읽어들인 인자값\n  - 환경변수값\n  - 기본 파일(``~/.pytistory/credentials.ini``\\)에 설정되어 있는 값\n\n즉, 환경변수, 기본 설정 파일에 client id가 적용되어 있다 하더라도 직접 넘기는 ``file_name``\\에 존재하는 설정들에 의해 덮어씌워지고,\n직접 인자값으로 넘기는 ``client_id``\\등의 인자값에 의해 덮어씌워집니다.\n\n``access_token``\\이 인자로 넘어올 경우 다른 옵션은 전부 무시하고, ``access_token``\\만을 설정합니다.\n\n직접 Access Token 설정\n********************************\n\n.. code-block:: python\n\n  from pytistory import PyTistory\n\n  pytistory = PyTistory()\n  pytistory.configure(\n    access_token='some-example-access-token')\n\n함수의 인자값을 통한 설정\n********************************\n\n.. code-block:: python\n\n  from pytistory import PyTistory\n\n  pytistory = PyTistory()\n  pytistory.configure(\n    client_id='some-example-client-id',\n    tistory_id='some-example-tistory-id',\n    tistory_password='some-example-tistory-password')\n\n파일을 통한 설정\n******************\n\n.. code-block:: python\n\n  from pytistory import PyTistory\n\n  pytistory = PyTistory()\n  pytistory.configure(\n    file_name='./some/path/to/credentials.ini')\n\n파일 형식은 ini(Initialization)을 따릅니다.\n\n.. code-block:: ini\n\n  [pytistory]\n  client_id=some-client-id\n  tistory_id=some-tistory-id\n  tistory_password=some-tistory-password\n\n환경변수를 통한 설정\n**********************\n\n환경 변수로는 다음과 같이 설정할 수 있습니다.\n\n.. code-block:: bash\n\n  export PYTISTORY_CLIENT_ID=some-example-client-id\n  export PYTISTORY_TISTORY_ID=some-example-tistory-id\n  export PYTISTORY_TISTORY_PASSWORD=some-example-tistory-password\n\nAPI호출\n~~~~~~~~~~~~\n\nhttps://www.tistory.com/apis/kind/action 와 같은 api를 호출할 경우 아래처럼 호출합니다.\n\n.. code-block:: python\n\n  from pytistory import PyTistory\n\n  pytistory = PyTistory()\n  pytistory.configure()\n\n  response = pytistory.kind.action(args...)\n\n예시로 블로그 정보를 받아오는 코드는 아래와 같습니다.\n\n.. code-block:: python\n\n  from pytistory import PyTistory\n\n  pytistory = PyTistory()\n  pytistory.configure()\n\n  response = pytistory.blog.info()\n\n결과값은 아래처럼 받을 수 있습니다.\n\n.. code-block:: json\n\n  {\n    \"status\": \"200\",\n    \"id\": \"blogtest_080@hanmail.net\",\n    \"item\": [\n      {\n        \"url\": \"http://oauth.tistory.com\",\n        \"secondaryUrl\": \"http://\",\n        \"nickname\": \"Tistory API\",\n        \"title\": \"나만의 앱, Tistory OAuth API 로 만들어보세요!\",\n        \"description\": \"\",\n        \"default\": \"Y\",\n        \"blogIconUrl\":\n          \"http://i1.daumcdn.net/cfs.tistory/blog/79/795307/index.gif\",\n        \"faviconUrl\":\n          \"http://i1.daumcdn.net/cfs.tistory/blog/79/795307/index.ico\",\n        \"profileThumbnailImageUrl\":\n          \"http://cfile1.uf.tistory.com/R106x0/1851DB584DAF942950AF29\",\n        \"profileImageUrl\":\n          \"http://cfile1.uf.tistory.com/R106x0/1851DB584DAF942950AF29\",\n        \"statistics\": {\n          \"post\": \"3\",\n          \"comment\": \"0\",\n          \"trackback\": \"0\",\n          \"guestbook\": \"0\",\n          \"invitation\": \"0\"\n        }\n      },\n      {\n        \"url\": \"http://oauth2.tistory.com\",\n        \"secondaryUrl\": \"http://\",\n        \"nickname\": \"Tistory API\",\n        \"title\": \"나만의 비밀 홈\",\n        \"description\": \"\",\n        \"default\": \"N\",\n        \"blogIconUrl\":\n          \"http://i1.daumcdn.net/cfs.tistory/blog/79/795308/index.gif\",\n        \"faviconUrl\":\n          \"http://i1.daumcdn.net/cfs.tistory/blog/79/795308/index.ico\",\n        \"profileThumbnailImageUrl\": \"\",\n        \"profileImageUrl\": \"\",\n        \"blogId\": \"795308\",\n        \"statistics\": {\n          \"post\": \"0\",\n          \"comment\": \"0\",\n          \"trackback\": \"0\",\n          \"guestbook\": \"0\",\n          \"invitation\": \"0\"\n        }\n      }\n    ]\n  }\n\n\n기여\n----\n\n이 프로젝트는 부족한 점이 많습니다. Contribution은 언제나 환영입니다. 혹시 오류, 버그 혹은 업데이트가 필요한 점이 있으시다면\n`PR \u003chttps://github.com/JeongUkJae/pytistory/pulls\u003e`_ 또는 `Issue \u003chttps://github.com/JeongUkJae/pytistory/issues\u003e`_ 를 통해\n언제든지 알려주세요. 👏\n\nCopyright \u0026 License\n-------------------\n\nCopyright (c) 2018 JeongUkJae. MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeongukjae%2Fpytistory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeongukjae%2Fpytistory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeongukjae%2Fpytistory/lists"}