{"id":26227992,"url":"https://github.com/pebaz/tinyhttp","last_synced_at":"2025-04-19T16:42:37.107Z","repository":{"id":133137267,"uuid":"238792922","full_name":"Pebaz/tinyhttp","owner":"Pebaz","description":"Performant static file HTTP server using Nim for speed.","archived":false,"fork":false,"pushed_at":"2020-02-10T21:30:32.000Z","size":22,"stargazers_count":11,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T10:22:41.621Z","etag":null,"topics":["cli","nim","nimporter","nimporter-libraries","performance","python"],"latest_commit_sha":null,"homepage":"","language":"Nim","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/Pebaz.png","metadata":{"files":{"readme":"README.md","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":"2020-02-06T21:56:23.000Z","updated_at":"2023-01-25T01:38:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"1e969e4c-640e-4678-8a8e-63bdc3d123b6","html_url":"https://github.com/Pebaz/tinyhttp","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/Pebaz%2Ftinyhttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pebaz%2Ftinyhttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pebaz%2Ftinyhttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pebaz%2Ftinyhttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pebaz","download_url":"https://codeload.github.com/Pebaz/tinyhttp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249740562,"owners_count":21318695,"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":["cli","nim","nimporter","nimporter-libraries","performance","python"],"created_at":"2025-03-12T20:36:46.535Z","updated_at":"2025-04-19T16:42:37.101Z","avatar_url":"https://github.com/Pebaz.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tinyhttp\n\n\u003e Performant static file HTTP server using Nim for speed.\n\n### Features\n\n* High performance\n* Extremely lightweight (~1MB once compiled)\n* Render Markdown as HTML ([MarkDeep](https://casual-effects.com/markdeep/))\n\n### Description\n\ntinyhttp gets its speed from [Nim](https://nim-lang.org/).\nNim is a powerful language with the speed of C\nand the expressiveness of Python. [Fabio Cevasco](https://h3rald.com/) created a\ntiny HTTP server in Nim called [nimhttpd](https://github.com/h3rald/nimhttpd).\nMake sure to head over to his repository and star it 🙂. Nimporter (a library\nthat allows you to directly-import Nim files), made the porting process almost\neffortless.\n\n### Installation\n\nIn order to run tinyhttp, you must install:\n\n* The Nim programming language\n* Nimpy (`nimble install nimpy`)\n* Nimporter (`pip install nimporter`)\n\n```bash\n$ pip install git+https://github.com/Pebaz/tinyhttp\n```\n\n## Usage\n\nYou can use tinyhttp in 3 different ways:\n\n* As a library, for an ultra-lightweight HTTP server\n* As a runnable module\n* From the CLI\n\n#### Library\n\n```python\nimport time\nfrom tinyhttp import HttpServer\n\nserver = HttpServer(log=True)\nserver.start()\ntime.sleep(10)  # Do other things while serving in background\nserver.stop()\n```\n\n#### Runnable Module\n\n```bash\n$ python3 -m tinyhttp --host \"0.0.0.0\" --port 9090 --dir ../../\n```\n\n#### CLI\n\n```bash\n$ tinyhttp --host \"0.0.0.0\" --port 9090 --dir ../../\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpebaz%2Ftinyhttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpebaz%2Ftinyhttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpebaz%2Ftinyhttp/lists"}