{ "info": { "author": "Chris Gearhart", "author_email": "chris@gearley.com", "bugtrack_url": null, "classifiers": [], "description": "Chessnut\n========\n\n**Chessnut** is a simple chess board model written in Python.\n**Chessnut** is *not* a chess engine -- it has no AI to play games, and\nit has no GUI. It is a simple package that can import/export games in\n`Forsyth-Edwards\nNotation `__\n(FEN), generate a list of legal moves for the current board position,\nintelligently validate & apply moves (including *en passant*,\n*castling*, etc.), and keep track of the game with a history of both\nmoves and corresponding FEN representation.\n\n**Chessnut** is not written for speed, it is written for simplicity\n(there are only two real classes, and only about 200 lines of code). By\nadding a custom move evaluation function, **Chessnut** could be used as\na chess engine. The simplicity of the model lends itself well to\nstudying the construction of a chess engine without worrying about\nimplementing a chess model, or to easily find the set of legal moves for\neither player on a particular chess board for use in conjunction with\nanother chess application.\n\nInstallation\n------------\n\nVirualenv\n~~~~~~~~~\n\n**Chessnut** can be used as a module within your project or it can be\ninstalled on your system as a package. If you're going to install it as\na package, you should consider using\n`Virtualenv `__ to manage your\npython environment. With virtualenv installed, creating a new project\nenvironment is easy. From your terminal shell:\n\n::\n\n ~$ mkdir ~/project\n ~/$ cd project\n ~/project$ virtualenv env\n ~/project$ source env/bin/activate\n (env):~/project$\n\nFrom here you can use ``pip`` or ``setup.py`` to install the package and\nit will be restricted to the copy of python in the ``env`` directory.\nYou can leave the virtual environment by typing ``deactivate`` in the\nterminal, and restart the environment with ``source env/bin/activate``.\n\nPIP\n~~~\n\n``pip`` is the easiest way to install **Chessnut**. It can be installed\ndirectly from the `pypi `__\n`package `__:\n\n``pip install Chessnut``\n\nUpgrading to the latest version can be performed with the ``-U`` flag:\n\n``pip install -U Chessnut``\n\nOr from the `github `__\n`repository `__:\n\n``pip install git+https://github.com/cgearhart/Chessnut.git``\n\nSetup.py\n~~~~~~~~\n\nIf you prefer, you can install **Chessnut** manually with ``setup.py``.\nAfter downloading the source files to a local directory (and setting up\na ``virtualenv``), switch into the project directory and run\n``setup.py``:\n\n``python -m setup.py install``\n\n(Note: To install the package globally you may have to use the ``sudo``\ncommand.)\n\nAs a Module\n~~~~~~~~~~~\n\nFinally, **Chessnut** is also a standalone module, so if you place the\n``Chessnut`` directory within your project folder, you don't need to\ninstall the package, you can just import the module as usual. (Using one\nof the package versions--particularly PIP--is still recommended as a way\nto create separation between your code and the **Chessnut** package, so\nthat you don't have to worry about merging your changes into future\nupgrades of **Chessnut**.\n\n::\n\n from Chessnut import Game\n\n ...\n\n **\n\nTesting\n-------\n\nUnit tests can be run with the ``test.sh`` shell script which launches\nthe ```coverage.py`` `__\nframework as configured in ``.coveragerc``, or you can use the standard\n`unittest `__ framework\nvia ``python -m unittest discover``. If you install the ``pylint``\npackage, you can run the checker with default options using\n``pylint --ignore=tests Chessnut``.\n\nUsing Chessnut\n--------------\n\nThere are only two real classes in the **Chessnut** package: ``Board``\nand ``Game``. (There is also a\n`namedtuple `__,\n``State``, which creates a class, and another class, ``InvalidMove``--a\nsubclass of ``Exception``, used to avoid generic try/except statements).\n``Board`` is only used internally by ``Game`` to keep track of pieces\nand perform string formatting to and from FEN notation, so ``Game``\nshould be the only class you need to import. After installing the\nChessnut package, you can import and use it as you would expect:\n\n::\n\n from Chessnut import Game\n\n chessgame = Game()\n print(chessgame) # 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1'\n\n print(chessgame.get_moves())\n \"\"\"\n ['a2a3', 'a2a4', 'b2b3', 'b2b4', 'c2c3', 'c2c4', 'd2d3', 'd2d4', 'e2e3', \n 'e2e4', 'f2f3', 'f2f4', 'g2g3', 'g2g4', 'h2h3', 'h2h4', 'b1c3', 'b1a3', \n 'g1h3', 'g1f3']\n \"\"\"\n\n chessgame.apply_move('e2e4') # succeeds!\n print(chessgame) # 'rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1'\n\n chessgame.apply_move('e2e4') # fails! (raises InvalidMove exception)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cgearhart/Chessnut", "keywords": "chess", "license": "UNLICENSE", "maintainer": null, "maintainer_email": null, "name": "Chessnut", "package_url": "https://pypi.org/project/Chessnut/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Chessnut/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/cgearhart/Chessnut" }, "release_url": "https://pypi.org/project/Chessnut/0.3.1/", "requires_dist": null, "requires_python": null, "summary": "A basic chess model to imports/export FEN & finds moves.", "version": "0.3.1" }, "last_serial": 2280090, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "03fbf2dd3cf97e0d1b8d52b0103299fb", "sha256": "b01d9a11ad12f0df3c89630efeb2994d1fd98b8455eac473749b42d75b63c782" }, "downloads": -1, "filename": "Chessnut-0.2.tar.gz", "has_sig": false, "md5_digest": "03fbf2dd3cf97e0d1b8d52b0103299fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7370, "upload_time": "2013-11-30T00:03:40", "url": "https://files.pythonhosted.org/packages/30/c3/75d7fcbd83c28b742fa56f2103fff6a89d390f63a7744c1bf1309594d5ae/Chessnut-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "4bc8af940b3de53e06fe2b891b0b62d6", "sha256": "05707b5a80d6b18e504aafbb3783fcdb38b7c920595d38d73272e9d1deb7498d" }, "downloads": -1, "filename": "Chessnut-0.2.1.tar.gz", "has_sig": false, "md5_digest": "4bc8af940b3de53e06fe2b891b0b62d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7383, "upload_time": "2013-11-30T00:49:49", "url": "https://files.pythonhosted.org/packages/17/19/63e4c4aa710dc32495fa7f6f19026f622bb22e28dfd2b746c609a9c9c68f/Chessnut-0.2.1.tar.gz" } ], "0.2.10": [ { "comment_text": "", "digests": { "md5": "d5f30210214eaed8e21b27b9db1f0d4f", "sha256": "f78919953b0d783d87fe3c50ae22e1a78d76d379014dfbcf106432669831159c" }, "downloads": -1, "filename": "Chessnut-0.2.10.tar.gz", "has_sig": false, "md5_digest": "d5f30210214eaed8e21b27b9db1f0d4f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10384, "upload_time": "2013-12-22T04:36:13", "url": "https://files.pythonhosted.org/packages/5d/a7/424897a1020d1da0dde0998d5f1791e370d4111e6ea095890c053c2b8179/Chessnut-0.2.10.tar.gz" } ], "0.2.11": [ { "comment_text": "", "digests": { "md5": "ca61f492997f2b8911e2ba2d862d0aac", "sha256": "05246e1d8fe70e943226c735eadf1194d6ed55b35d4ccbfce72452991ae3fb80" }, "downloads": -1, "filename": "Chessnut-0.2.11.tar.gz", "has_sig": false, "md5_digest": "ca61f492997f2b8911e2ba2d862d0aac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10567, "upload_time": "2013-12-24T05:10:29", "url": "https://files.pythonhosted.org/packages/76/86/18bceae7a6033964469a213e2670afe5e46d1fa2eac85a74294c6e4f2076/Chessnut-0.2.11.tar.gz" } ], "0.2.12": [ { "comment_text": "", "digests": { "md5": "d1111751aebde96e97005093ca488ce9", "sha256": "054d5d3e2a1782783ca4ebd4cdafb5f16663eac91c0eecc08a7733dbdb1e6edf" }, "downloads": -1, "filename": "Chessnut-0.2.12.tar.gz", "has_sig": false, "md5_digest": "d1111751aebde96e97005093ca488ce9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10572, "upload_time": "2014-05-14T03:42:51", "url": "https://files.pythonhosted.org/packages/36/cb/923e4cdc098854b7066b971142e51b6123f1fa8d2bd38953f9665a799f7d/Chessnut-0.2.12.tar.gz" } ], "0.2.13": [ { "comment_text": "", "digests": { "md5": "05b239a4b8178e75486fa927978ca40c", "sha256": "a73b5ab5b2bf8e9a7c63febf691a1f4053d74102952a7052c4a298dc790dfb62" }, "downloads": -1, "filename": "Chessnut-0.2.13.tar.gz", "has_sig": false, "md5_digest": "05b239a4b8178e75486fa927978ca40c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10588, "upload_time": "2014-05-31T16:07:23", "url": "https://files.pythonhosted.org/packages/f3/1c/eebd6a9ac22f7c5136f98b7075768feba033dbbad2a269416f3cde8992ad/Chessnut-0.2.13.tar.gz" } ], "0.2.14": [ { "comment_text": "", "digests": { "md5": "68a7334484ca45e21ae684ba47894181", "sha256": "762d7674a77e75d46382bc0c61a8263015fdb80157c73e8cbf1aad2201f8ad47" }, "downloads": -1, "filename": "Chessnut-0.2.14.tar.gz", "has_sig": false, "md5_digest": "68a7334484ca45e21ae684ba47894181", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11189, "upload_time": "2014-12-28T15:50:14", "url": "https://files.pythonhosted.org/packages/f8/50/bd547935bd98a8b511dbabcdbe66b29d0425bf4a79b3a82166eb2825c567/Chessnut-0.2.14.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "63f570b1d73044266861a28f7533c1eb", "sha256": "81494e3674d24b0f3a7bf5cb90a432b9a87ff24b7b5c71b2b5cf299dd3ec9e83" }, "downloads": -1, "filename": "Chessnut-0.2.2.tar.gz", "has_sig": false, "md5_digest": "63f570b1d73044266861a28f7533c1eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7390, "upload_time": "2013-11-30T00:52:09", "url": "https://files.pythonhosted.org/packages/3d/cf/7f92376d8fcba5f40f7aedf43e27275509e4dde2a5fe95bc20163a748d07/Chessnut-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "1f40c074884231d52147670d32c182d4", "sha256": "dd97649bc5ff722bdbbaa0d2c88688030669941507f89470907a6d3a13177280" }, "downloads": -1, "filename": "Chessnut-0.2.3.tar.gz", "has_sig": false, "md5_digest": "1f40c074884231d52147670d32c182d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7391, "upload_time": "2013-11-30T01:08:28", "url": "https://files.pythonhosted.org/packages/5f/d4/ef53bf0339b50603e484398a6a7e29b31b78cbcd624616ae334b6112734a/Chessnut-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "88fbbe320403a913b9b0cb4dcd268d32", "sha256": "33157e79055aa2d701e8d4cbc7b9b693206bf4ad1f179fc83f343733a837ebec" }, "downloads": -1, "filename": "Chessnut-0.2.4.tar.gz", "has_sig": false, "md5_digest": "88fbbe320403a913b9b0cb4dcd268d32", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7388, "upload_time": "2013-11-30T01:26:55", "url": "https://files.pythonhosted.org/packages/ad/db/0ec3a0a2c49a2ddfcc84fab5f8e5d9179c63e2f627d6abc82ceae736b8cb/Chessnut-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "178474dc9b6a04366e6cfc88924272b5", "sha256": "9f71f9a3f12803c40e5bfcc6a836b8fa7043c623c39a1dc5842640a1ca0d60c9" }, "downloads": -1, "filename": "Chessnut-0.2.5.tar.gz", "has_sig": false, "md5_digest": "178474dc9b6a04366e6cfc88924272b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7428, "upload_time": "2013-11-30T02:30:01", "url": "https://files.pythonhosted.org/packages/a2/fa/93f9e1adae48c4cc0b450bc71c3877d5b5f7a1ba190242f6c034a663c4ff/Chessnut-0.2.5.tar.gz" } ], "0.2.6": [ { "comment_text": "", "digests": { "md5": "79fbb73d1840bbeae2301fdea8c7e2c1", "sha256": "095a1c1c7f6366e23bd1480deddd8c0946d62a3abb5d8f39f485057c63fd206a" }, "downloads": -1, "filename": "Chessnut-0.2.6.tar.gz", "has_sig": false, "md5_digest": "79fbb73d1840bbeae2301fdea8c7e2c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10118, "upload_time": "2013-11-30T05:00:45", "url": "https://files.pythonhosted.org/packages/fb/87/f10ccf732409eaf29efe4361bdfd09205197e59b2925b8c0adaa543dd45f/Chessnut-0.2.6.tar.gz" } ], "0.2.7": [ { "comment_text": "", "digests": { "md5": "836c700b61bb1910524d361a89866410", "sha256": "8422f470931f767beef817a3b345587b2f52a591a98892013a20059408306237" }, "downloads": -1, "filename": "Chessnut-0.2.7.tar.gz", "has_sig": false, "md5_digest": "836c700b61bb1910524d361a89866410", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10087, "upload_time": "2013-12-03T05:05:15", "url": "https://files.pythonhosted.org/packages/96/31/7ac7b892fbc00f772923c24c19d1217c76dffab4aabe9092f1b2d38c7cbc/Chessnut-0.2.7.tar.gz" } ], "0.2.8": [ { "comment_text": "", "digests": { "md5": "4c000904433c829f04aa5b7a92712949", "sha256": "1bd2ee74a4236e9e255dbb71658555e98caf617370e5c43be19fc08c4f02dfcc" }, "downloads": -1, "filename": "Chessnut-0.2.8.tar.gz", "has_sig": false, "md5_digest": "4c000904433c829f04aa5b7a92712949", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10597, "upload_time": "2013-12-04T18:38:34", "url": "https://files.pythonhosted.org/packages/5b/58/7b18d9f3a49e73be2a4307645e7d57c466e808b1b777ed534e76aba6c699/Chessnut-0.2.8.tar.gz" } ], "0.2.9": [ { "comment_text": "", "digests": { "md5": "b24d2ff2a740efc9201efdcf2ce977e3", "sha256": "dc09aa5303784fe7a8e0d53f44ee10f7cec5f53b86fdab1c0891bdb441446677" }, "downloads": -1, "filename": "Chessnut-0.2.9.tar.gz", "has_sig": false, "md5_digest": "b24d2ff2a740efc9201efdcf2ce977e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10356, "upload_time": "2013-12-09T03:33:49", "url": "https://files.pythonhosted.org/packages/2e/55/57e422ed270ddf8f4bf40c8d686566f7e632abc8c3df9ddccdb9c3cff2b1/Chessnut-0.2.9.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "c3d188645d7a085c680cc4a582abc0f9", "sha256": "bfc2b0e623369a4f2d1f1b47630450aa148da3428a0e1e9f6626181f801bb2d3" }, "downloads": -1, "filename": "Chessnut-0.3.0.tar.gz", "has_sig": false, "md5_digest": "c3d188645d7a085c680cc4a582abc0f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11188, "upload_time": "2015-12-26T14:42:45", "url": "https://files.pythonhosted.org/packages/9d/9d/176ec4d73bb10dd229d1b3624af289d0e5206cf42120ebbe2adac81a9c81/Chessnut-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "260b7c9264380d05296c73f454b4b189", "sha256": "817d5c8ae904e81bb9596658ea28bd38c367e85b13cfe740e15d0c9649d2c400" }, "downloads": -1, "filename": "Chessnut-0.3.1.tar.gz", "has_sig": false, "md5_digest": "260b7c9264380d05296c73f454b4b189", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11258, "upload_time": "2016-08-14T01:15:44", "url": "https://files.pythonhosted.org/packages/1f/a6/ccc94c54f13f326729f5e70dbd816fbc152b006259d793a5e485d3d7e1f7/Chessnut-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "260b7c9264380d05296c73f454b4b189", "sha256": "817d5c8ae904e81bb9596658ea28bd38c367e85b13cfe740e15d0c9649d2c400" }, "downloads": -1, "filename": "Chessnut-0.3.1.tar.gz", "has_sig": false, "md5_digest": "260b7c9264380d05296c73f454b4b189", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11258, "upload_time": "2016-08-14T01:15:44", "url": "https://files.pythonhosted.org/packages/1f/a6/ccc94c54f13f326729f5e70dbd816fbc152b006259d793a5e485d3d7e1f7/Chessnut-0.3.1.tar.gz" } ] }