{"id":16759829,"url":"https://github.com/keszybz/sphinxcontrib-codesample","last_synced_at":"2025-08-22T06:15:41.634Z","repository":{"id":138003950,"uuid":"86090554","full_name":"keszybz/sphinxcontrib-codesample","owner":"keszybz","description":"Sphinx directive to display and execute Python code","archived":false,"fork":false,"pushed_at":"2019-07-14T08:52:42.000Z","size":1081,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-22T20:51:41.986Z","etag":null,"topics":["extension","python3","sphinx-documentation"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keszybz.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-24T16:49:08.000Z","updated_at":"2019-07-14T08:52:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"6a035d0c-5a1f-47a3-b434-7d8114faef35","html_url":"https://github.com/keszybz/sphinxcontrib-codesample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keszybz%2Fsphinxcontrib-codesample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keszybz%2Fsphinxcontrib-codesample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keszybz%2Fsphinxcontrib-codesample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keszybz%2Fsphinxcontrib-codesample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keszybz","download_url":"https://codeload.github.com/keszybz/sphinxcontrib-codesample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243846984,"owners_count":20357297,"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":["extension","python3","sphinx-documentation"],"created_at":"2024-10-13T04:09:09.096Z","updated_at":"2025-03-16T08:40:53.603Z","avatar_url":"https://github.com/keszybz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"########################\nsphinxcontrib-codesample\n########################\n\nA Sphinx_ extension to insert arbitrary Python code and its output\ninto documents. Very similar to code samples in docstrings, but the\noutput is dynamically generated each time documentation is built.\n\nThis extension is similar to IPython's `ipython_directive`_, but does\nnot use IPython formatting conventions and is much simpler by the\nvirtue of using plain Python to execute commands.\n\nInstallation\n------------\n\nInstall this extension using pip from `pypi`_::\n\n   pip install sphinxcontrib-codesample\n\nUsage\n-----\n\nJust add this extension to ``extensions``::\n\n   extensions = ['sphinxcontrib.codesample']\n\nand insert plain Python code:\n\n.. code-block:: rst\n\n   .. codesample::\n\n      x = 3\n      print(x**3)\n\nOutput:\n\n.. code-block:: python\n\n   \u003e\u003e\u003e x = 3\n   \u003e\u003e\u003e print(x ** 3)\n   9\n\nPlease refer to the documentation_ for comprehensive information about usage.\n\n\nIssues\n------\n\nPlease report issues to the `issue tracker`_ if you found a bug.\n\nDevelopment\n-----------\n\nThe source code is hosted on github::\n\n   git clone https://github.com/keszybz/sphinxcontrib-codesample\n\n.. _Sphinx: http://sphinx.pocoo.org/latest\n.. _ipython_directive: http://matplotlib.org/sampledoc/ipython_directive.html\n.. _pypi: http://pypi.python.org/pypi/sphinxcontrib-codesample\n.. _documentation: https://keszybz.github.io/sphinxcontrib-codesample\n.. _issue tracker: https://github.com/keszybz/sphinxcontrib-codesample/issues\n.. _Github: https://github.com/keszybz/sphinxcontrib-codesample\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeszybz%2Fsphinxcontrib-codesample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeszybz%2Fsphinxcontrib-codesample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeszybz%2Fsphinxcontrib-codesample/lists"}