{ "info": { "author": "JT Paasch", "author_email": "jt.paasch@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Build Tools" ], "description": "Simply Github\n=============\n\nA simple tool for working with Github remotely. The basic interface is minimal.\nWith ``Simply Github``, you can:\n\n * Create and delete branches.\n * Add or remove files from a branch.\n * Merge branches.\n\n\nProfiles\n--------\n\nPretty much every ``Simply Github`` function needs a profile as its first\nargument. A profile provides ``Simply Github`` with two pieces of information.\nIt tells ``Simply Github``:\n\n * The ``repo`` it should connect to.\n * The ``token`` it should connect with.\n\nThe ``repo`` is the name of a repo in the standard git form of\n``:owner/:repo`` -- for instance, ``jtpaasch/simplygithub``.\n\nThe ``token`` is a valid personal access token, which you can create from\nyour Github account, under account settings. See\nhttps://help.github.com/articles/creating-an-access-token-for-command-line-use\n\nTo generate a profile to use just during a coding session, import the\n``simplygithub.authentication.profile`` package and use the\n``ephemeral_profile()`` function. For example::\n\n from simplygithub.authentication import profile\n\n my_profile = profile.ephemeral_profile(repo=\"jtpaasch/simplygithub\",\n token=\"a3ef21ac0f...\")\n\nYou can then use ``my_profile`` for any of the ``Simply Github`` functions\nthat need a profile.\n\nAn ephemeral profile only lasts for the coding session though. It disappears\nwhen the ``my_profile`` variable disappears. If you want to store a profile\nin a config file, use the ``write_profile()`` function.\n\nThat function takes the aforementioned ``repo`` and ``token`` arguments, but\nyou also need to give the profile a name so you can retrieve it later.\n\nThis creates the same profile as above, but names it ``default``::\n\n from simplygithub.authentication import profile\n\n my_profile = profile.write_profile(name=\"default\",\n repo=\"jtpaasch/simplygithub\",\n token=\"a3ef21ac0f...\")\n\nThat will save the profile in a file at ``~/.profile/simplygithub/github``.\n(You can also create/modify this file yourself, by hand.)\n\nYou can load the profile anytime later with the ``read_profile()`` function::\n\n from simplygithub.authentication import profile\n\n my_profile = profile.read_profile(\"default\")\n\nOnce you have a profile loaded into a variable (like ``my_profile``), you can\nuse it for any of the ``Simply Github`` functions that requires a profile as\ntheir first argument.\n\n\nCreating branches\n-----------------\n\nUse the ``simplygithub.branches`` package to work with branches::\n\n from simplygithub import branches\n\nTo see a list of all your branches (using ``my_profile`` from above)::\n\n branches.list_branches(my_profile)\n\nTo create a branch off of master::\n\n branches.create_branch(my_profile, \"feature-branch\", branch_off=\"master\")\n\nTo merge a feature branch into master::\n\n branches.merge(my_profile, \"feature-branch\", merge_into=\"master\")\n\nTo delete a branch::\n\n branches.delete_branch(my_profile, \"feature-branch\")\n\n\nAdding and removing files from a branch\n---------------------------------------\n\nUse the ``simplygithub.files`` package to work with files::\n\n from simplygithub import files\n\nTo list all file objects in a branch (using ``my_profile`` from above)::\n\n files.list_files(my_profile, \"feature-branch\")\n\nTo get the (UTF-8 encoded) contents of a file on a branch::\n\n files.get_file(my_profile,\n branch=\"feature-branch\",\n file_path=\"folder/path/foo.py\")\n\nTo add a file to a branch::\n\n files.add_file(my_profile,\n branch=\"feature-branch\",\n file_path=\"folder/path/foo.py\",\n file_contents=\"This is a silly file.\")\n\nThat will add a file at ``folder/path/foo.py``, and give it the contents\n``This is a silly file.``. It will commit that into the ``feature-branch``.\n\nIf the file is an executable, add ``is_executable=True`` as a parameter. If\nyou want to provide a commit message, you do that with the ``commit_message``\nparameter::\n\n files.add_file(my_profile,\n branch=\"feature-branch\",\n file_path=\"folder/path/foo.py\",\n file_contents=\"This is a silly file.\",\n is_executable=True,\n commit_message=\"Added a silly file.\")\n\nTo delete a file from a branch::\n\n files.remove_file(my_profile,\n branch=\"feature-branch\",\n file_path=\"folder/path/foo.py\")\n\nThat will remove the file from the branch and commit the change. You can add\nan optional ``commit_message`` parameter if you like::\n\n files.remove_file(my_profile,\n branch=\"feature-branch\",\n file_path=\"folder/path/foo.py\",\n commit_message=\"Removed a silly file.\")", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jtpaasch/simplygithub", "keywords": "deployment development", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "simplygithub", "package_url": "https://pypi.org/project/simplygithub/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/simplygithub/", "project_urls": { "Homepage": "https://github.com/jtpaasch/simplygithub" }, "release_url": "https://pypi.org/project/simplygithub/0.2.0/", "requires_dist": [ "requests", "coverage; extra == 'test'", "flake8; extra == 'test'", "hypthesis; extra == 'test'", "pep257; extra == 'test'" ], "requires_python": "", "summary": "A simple tool for working with Github remotely.", "version": "0.2.0" }, "last_serial": 1797065, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "98c0a2742e900bb54997626424511a98", "sha256": "5087edd9e6185ec5f7b9a000234dd7ee4677052d12ece7e1fbe1013047812618" }, "downloads": -1, "filename": "simplygithub-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "98c0a2742e900bb54997626424511a98", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10418, "upload_time": "2015-10-31T12:07:49", "url": "https://files.pythonhosted.org/packages/30/ee/71773ffb18a25196cced070d580db907b01a072689e7c75ceaea182fa80d/simplygithub-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2bfd516dcae51414c935744057c523c0", "sha256": "b7a3bb04b604ee9ccd4a61336481d8fa7c8c8f09cf10d88bc4a57511d86018d5" }, "downloads": -1, "filename": "simplygithub-0.1.0.tar.gz", "has_sig": false, "md5_digest": "2bfd516dcae51414c935744057c523c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6257, "upload_time": "2015-10-31T12:07:53", "url": "https://files.pythonhosted.org/packages/af/2d/b772f433c0955a4a8a1a38d7f05044b8f520a39fa6a0ecae789e263fb3b9/simplygithub-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "8987e0bb56d1a240afdba31c21ffc0f5", "sha256": "389b33bb275421b744cad7c231b119f155e31b47ee667c09dc1c74ea239c6e9e" }, "downloads": -1, "filename": "simplygithub-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8987e0bb56d1a240afdba31c21ffc0f5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 16210, "upload_time": "2015-11-02T13:31:41", "url": "https://files.pythonhosted.org/packages/a8/d4/3db997bc54d191f0bd06b7c7e9443a8167b54ae5d3abd178c252df586e96/simplygithub-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "92c9ae4f2174011e9b6aff3924e7b979", "sha256": "775dd7568374b5dd717c817db14f0fb86eb4e44737aa87f516c863373cfe2201" }, "downloads": -1, "filename": "simplygithub-0.2.0.tar.gz", "has_sig": false, "md5_digest": "92c9ae4f2174011e9b6aff3924e7b979", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9941, "upload_time": "2015-11-02T13:31:48", "url": "https://files.pythonhosted.org/packages/50/0a/d21b70ac58861166e34fb0ad3e42e32d89ff07709f76acae23415cfa9c09/simplygithub-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8987e0bb56d1a240afdba31c21ffc0f5", "sha256": "389b33bb275421b744cad7c231b119f155e31b47ee667c09dc1c74ea239c6e9e" }, "downloads": -1, "filename": "simplygithub-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8987e0bb56d1a240afdba31c21ffc0f5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 16210, "upload_time": "2015-11-02T13:31:41", "url": "https://files.pythonhosted.org/packages/a8/d4/3db997bc54d191f0bd06b7c7e9443a8167b54ae5d3abd178c252df586e96/simplygithub-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "92c9ae4f2174011e9b6aff3924e7b979", "sha256": "775dd7568374b5dd717c817db14f0fb86eb4e44737aa87f516c863373cfe2201" }, "downloads": -1, "filename": "simplygithub-0.2.0.tar.gz", "has_sig": false, "md5_digest": "92c9ae4f2174011e9b6aff3924e7b979", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9941, "upload_time": "2015-11-02T13:31:48", "url": "https://files.pythonhosted.org/packages/50/0a/d21b70ac58861166e34fb0ad3e42e32d89ff07709f76acae23415cfa9c09/simplygithub-0.2.0.tar.gz" } ] }