{"id":20016865,"url":"https://github.com/qaptivator/circlib","last_synced_at":"2025-07-27T03:06:01.044Z","repository":{"id":224429889,"uuid":"763159115","full_name":"qaptivator/circlib","owner":"qaptivator","description":"Python library for creating and editing circloO levels","archived":false,"fork":false,"pushed_at":"2025-03-02T13:07:08.000Z","size":58,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T14:41:33.743Z","etag":null,"topics":["circloo","circloo-python","library","python","python-library"],"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/qaptivator.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":"2024-02-25T17:55:45.000Z","updated_at":"2025-03-02T13:07:11.000Z","dependencies_parsed_at":"2025-01-12T15:43:17.279Z","dependency_job_id":"18a64af1-7c06-4af8-81e1-b42692bced0c","html_url":"https://github.com/qaptivator/circlib","commit_stats":null,"previous_names":["qaptivator/circlib"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/qaptivator/circlib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qaptivator%2Fcirclib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qaptivator%2Fcirclib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qaptivator%2Fcirclib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qaptivator%2Fcirclib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qaptivator","download_url":"https://codeload.github.com/qaptivator/circlib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qaptivator%2Fcirclib/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267293760,"owners_count":24065321,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["circloo","circloo-python","library","python","python-library"],"created_at":"2024-11-13T08:13:28.824Z","updated_at":"2025-07-27T03:06:01.016Z","avatar_url":"https://github.com/qaptivator.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# circlib\n\nPython library for creating and editing CircloO levels\nCurrently the library isn't hosted on PyPi, so instead, just clone the repository and then extract the `circlib` folder.\n`git clone https://github.com/qaptivator/circlib.git`\n\n# Usage\n\nHere are some examples of how you can use this library.\nYou can parse an arleady existing level:\n\n```py\nfrom circlib import Level\n\nlevel = Level.parse('your level string')\nlevel.create_object(\"fixed_rectangle\", [\"1563\", \"1368\", \"102\", \"52\", \"0\"])\nprint(level.stringify())\n```\n\nOr create a new one from scratch:\n\n```py\nlevel = Level()\nlevel.create_object(\"fixed_rectangle\", [\"1500\", \"1300\", \"50\", \"50\", \"45\"])\n```\n\n**Note:** strings which are not numbers in the properties of the object automatically get surrounded by '' (quotes). It does not happen when you add a newline to the start of the prop, for example: `\\nnoanim`. This can be used for multi-line properties like forementioned `noanim`, or for trigger collectibles like `trigger`.\n\n# API\n\n## class Level\n\n- Level.headers -- Headers of the level. For example: color, gravity, total circles. It is a dictionary.\n- Level.objects -- Objects of the level. Not recommended to change it manually, use the provided methods instead. It is a list of Object class instances.\n\n- Level.parse(str) -- A static method. Create a new level by parsing level's string. Returns a new Level object with all the headers and objects.\n- Level.stringify() -- Returns the stringified version of the level, which can be imported in-game.\n- Level.get_object_by_id(id) -- Returns an object with matching it. Be aware that in CircloO levels, ids are numbers, not strings.\n- Level.get_object_by_type(type) -- Returns every object with matching type. See all types in the further section.\n- Level.create_object(type, props, connections?) -- Creates a new object and returns it. Type and props are necessary, but connections is only needed for connectable objects, like ropes.\n- Level.remove_object(object) -- Removes an object by giving it an Object instance.\n- Level.remove_object_by_id(id) - Removes an object which matches the id.\n\n## class Object\n\n- Object. id -- Object's integer id, not a string.\n- Object.type -- Object's type as a string. See all types in the further section.\n- Object.props -- Array of every object's prop. It is stuff like position or rotation. P.S. there isn't any documentation of every prop of every object.\n- Object.get_connections() -- Returns every connection of the object, such as two objects connected by a rope. If the object isn't an connectable, it throws an error.\n\n## Object types\n\nFormat: object type -\u003e corresponding type in the level's text file\n\n- fixed_circle -\u003e c\n- fixed_rectangle -\u003e b\n- triangle -\u003e t\n- line -\u003e l_at\n- arc -\u003e / LE_ARC_DESCRIPTION\n- bezier_curve -\u003e curve\n- growing_circle -\u003e gc\n- growing_rectangle -\u003e rGr\n- movable_circle -\u003e mcG\n- movable_rectangle -\u003e mb\n- movable_triangle -\u003e mtG\n- superglue_connection -\u003e GLUE\n- rope_connection -\u003e r\n- pulley_connection -\u003e p\n- hinge_connection -\u003e hinge\n- prismatic_connection -\u003e pr\n- rotatable_rectangle -\u003e rr\n- rotatable_circle -\u003e rc\n- springy_rectangle -\u003e wr\n- ball_generator -\u003e tmc\n- box_generator -\u003e tmb\n- portal -\u003e portal\n- start -\u003e y\n- collectable -\u003e ic\n- special_connection -\u003e spc\n\n## Header types\n\n- totalCircles -\u003e totalCircles\n- editorTool -\u003e / EDITOR_TOOL\n- editorView -\u003e / EDITOR_VIEW\n- edit -\u003e / EDT\n- gravity -\u003e grav\n- levelscriptVersion -\u003e levelscriptVersion\n- colors -\u003e COLORS\n\n## Collectable types\n\n- regular -\u003e i\n- regular_collision -\u003e io\n- gravity -\u003e ig\n- gravity_collision -\u003e im\n- size -\u003e is\n- size_collision -\u003e iso\n- disconnect -\u003e irb\n- disconnect_collision -\u003e irbo\n- speed -\u003e ips\n- speed_collision -\u003e ipso\n- special -\u003e isp\n- special_collision -\u003e ispo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqaptivator%2Fcirclib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqaptivator%2Fcirclib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqaptivator%2Fcirclib/lists"}