{"id":16793720,"url":"https://github.com/grandmoff100/pygrids","last_synced_at":"2026-05-18T08:32:50.145Z","repository":{"id":105003147,"uuid":"300970798","full_name":"GrandMoff100/PyGrids","owner":"GrandMoff100","description":"Dimensional Data Manipulation and Spreadsheet-like pretty grids.","archived":false,"fork":false,"pushed_at":"2023-03-02T19:58:37.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T02:24:12.129Z","etag":null,"topics":["arrays","grids","hacktoberfest","numpy","python","spreadsheet"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GrandMoff100.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-10-03T20:15:08.000Z","updated_at":"2023-03-02T19:58:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"b84aa02c-070c-45e0-86e2-da7df1904d65","html_url":"https://github.com/GrandMoff100/PyGrids","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GrandMoff100/PyGrids","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrandMoff100%2FPyGrids","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrandMoff100%2FPyGrids/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrandMoff100%2FPyGrids/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrandMoff100%2FPyGrids/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GrandMoff100","download_url":"https://codeload.github.com/GrandMoff100/PyGrids/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrandMoff100%2FPyGrids/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33170847,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T05:43:36.989Z","status":"ssl_error","status_checked_at":"2026-05-18T05:43:19.133Z","response_time":71,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["arrays","grids","hacktoberfest","numpy","python","spreadsheet"],"created_at":"2024-10-13T08:50:04.599Z","updated_at":"2026-05-18T08:32:50.128Z","avatar_url":"https://github.com/GrandMoff100.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyGrids\n\n## Description\nPyGrids is an module for storing and manipulating spreadsheet-like or grid-like information in python.\nIt also uses numpy to speed up array operations.\n\n## Example\n```py\nfrom grids import Grid\n\ngrid = Grid(5,3) # Create an empty 5x3 grid.\n\nprint(grid.get_cell(5,3)) # -\u003e ∅ None\nprint(grid.get_cell(3,1)) # -\u003e ∅ None\n\ngrid.update_cell(5,3,'Foo')\ngrid.update_cell(3,2,'Bar')\n\nprint()\nprint(grid.view())\n```\nWill output...\n```py\n∅ \n∅\n\n∅      ∅      ∅      ∅      ∅     \n∅      ∅      'Bar'  ∅      ∅     \n∅      ∅      ∅      ∅      'Foo' \n```\n\n## Installation\n```bash\n$ pip install pygrids\n```\n\n## ``Grid`` Usage\nHere's how you can use PyGrids.\n\n### Using cells\n**Getting cells**\n```py\ngrid.get_cell(\u003cx\u003e, \u003cy\u003e)\n```\n\n**Updating cells**\n```py\ngrid.update_cell(\u003cx\u003e, \u003cy\u003e, \u003cnew_value\u003e)\n```\n\n**Overviewing cells**\n```py\nprint(grid.view())\n```\n\n**Iterating through cells**\n\u003e By Columns\n```py\nfor column in grid.y_by_x():\n    for cell in column:\n        print(x)\n```\n\u003e By Rows\n```py\nfor row in grid.x_by_y():\n    for cell in row:\n        print(y)\n```\n\n### Saving `Grid`s\nYou can save your grids by using their built-in ``save()`` method.\n```py\n# Saves by default to grid1.dat or grid2.dat if that's taken or grid3.dat if grid2.dat it taken, etc.\ngrid.save()\n# Or you can specify a specify a specific filename\ngrid.save(filename='mygrid.dat')\n```\n\n### Loading `Grid`s from file\nYou can also load your grids into python by using `Grid`'s static ``load()`` method like so.\n```py\ngrid = Grid.load('mygrid.dat')\n```\n\n## ``GridLog``'s\nEach grid object tracks when it's methods are used and logs them to it's unique ``GridLog`` object. Let's take a look from out first example, what it's log would look like.\n```py\nprint(grid.log)\n```\nLooks something like\n```py\n[GridLog created at [2020-10-21 20:30:11.230139]]:\n-\u003e [GET_CELL] (5, 3) at [2020-10-21 20:30:11.230171]\n-\u003e [GET_CELL] (3, 1) at [2020-10-21 20:30:11.230233]\n-\u003e [UPDATE_CELL] (5, 3, 'Foo') at [2020-10-21 20:30:11.230270]\n-\u003e [UPDATE_CELL] (3, 2, 'Bar') at [2020-10-21 20:30:11.230286]\n-\u003e [LOG_VIEW] () at [2020-10-21 20:30:11.230401]\n```\n\n## ``MultiDimensionalArray``'s\nUnlike grids, which are constrained to only 2 dimensions, `MultiDimensionalArray`s support arrays of any shape.\n\n```py\nfrom grids import MultiDimensionalArray\n\nmyshape = [3,2,4,5]\n\narray = MultiDimensionalArray(myshape)\n```\n\nKeep reading for how to use it\n\n## MultiDimensionalArray Usage\nHere's a few example's on how use MultiDimensionalArray's\n\n### Updating and Getting Cells\n```py\ntarget_coord = [1,2,3,4]\n\narray.update_cell(target_coord, 'Foo')\n\nprint(array.get_cell(target_coord)) # Foo\n```\n\n## License\nThis software is licensed by an MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrandmoff100%2Fpygrids","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrandmoff100%2Fpygrids","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrandmoff100%2Fpygrids/lists"}