{
"info": {
"author": "Filipp Frizzy",
"author_email": "filipp.s.frizzy@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Apache Software License",
"License :: OSI Approved :: BSD License",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Topic :: Software Development",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Clustering",
"Topic :: System :: Systems Administration"
],
"description": "pyspaces\n========\n\nWorks with Linux namespaces through glibc with pure python\n\n|License| |Latest Version| |Downloads| |Docs|\n\ndiscuss:\n`reddit `__,\n`habrahabr `__\n\nGoals\n-----\n\nThere is so many beautiful tools like\n`docker `__,\n`rocket `__ and\n`vagga `__ written in go and rust,\nbut none in python. I think that is because there is no easy way to work\nwith linux namespaces in python:\n\n- you can use `asylum `__ -\n a project that looks dead and with a codebase hosted not on\n mainstream hub like github\n- or you can use the\n `python-libvirt `__\n bindings with a big layer of abstraction\n- or just use the native glibc library with ctypes\n- otherwise subprocess.Popen -- your choice\n\nI want to change this: I want to create native python bindings to glibc\nwith interface of python multiprocessing.Process.\n\nPS: you can look at\n`python-nsenter `__ too, it's\nlooks awesome.\n\nPPS: new project from author of asylum -\n`butter `__\n\nExample\n-------\n\nFirst simple example:\n\n.. code:: python\n\n import os\n from pyspaces import Container\n\n\n def execute(argv):\n os.execvp(argv[0], argv)\n\n cmd = \"mount -t proc proc /proc; ps ax\"\n c = Container(target=execute, args=(('bash', '-c', cmd),),\n uid_map='0 1000 1',\n newpid=True, newuser=True, newns=True\n )\n c.start()\n print(\"PID of child created by clone() is %ld\\n\" % c.pid)\n c.join()\n print(\"Child returned: pid %s, status %s\" % (c.pid, c.exitcode))\n\noutput:\n\n.. code:: bash\n\n PID of child created by clone() is 15978\n\n PID TTY STAT TIME COMMAND\n 1 pts/19 S+ 0:00 bash -c mount -t proc proc /proc; ps ax\n 3 pts/19 R+ 0:00 ps ax\n\n Child returned: pid 15978, status 0\n\nCLI\n---\n\n.. code:: bash\n\n space execute -v --pid --mnt --user --uid 1000 --gid 1000 bash -c 'mount -t proc /proc; ps ax'\n\n.. code:: bash\n\n space chroot --pid --uid '0 1000 1' ~/.local/share/lxc/ubuntu/rootfs/ /bin/ls /home/\n\n.. code:: bash\n\n space inject --net --mnt 19840 bash\n\nNote: If the program you're trying to exec is dynamically linked, and\nthe dynamic linker is not present in /lib in the chroot environment -\nyou will get the following error: \"OSError: [Errno 2] No such file or\ndirectory\". You need all the other files the dynamic-linked program\ndepends on, including shared libraries and any essential\nconfiguration/tables/etc in the new root directories.\n`src `__\n\nSecurity\n--------\n\nRead `this\narticle `__\nplease\n\nChangelog\n---------\n\n| `on\n github `__\n| `digest `__\n\nTODO\n----\n\n- [x] namespaces: clone & Container\n- [x] CLI\n- [x] Chroot\n- [x] setns & inject\n- [ ] cgroups\n- [ ] SCM: apparmor & selinux\n- [ ] capabilities\n- [ ] mount\n- [ ] network\n- [ ] move CLI to separate package\n- [ ] addons\n- [ ] container list\n- [ ] support for lxc, vagga, rocket, docker, etc...\n- [ ] ...\n- [ ] one tool for rule them all!!1\n\n.. |License| image:: https://pypip.in/license/pyspaces/badge.svg\n :target: https://pypi.python.org/pypi/pyspaces/\n.. |Latest Version| image:: https://pypip.in/version/pyspaces/badge.svg\n :target: https://pypi.python.org/pypi/pyspaces/\n.. |Downloads| image:: https://pypip.in/download/pyspaces/badge.svg\n :target: https://pypi.python.org/pypi/pyspaces/\n.. |Docs| image:: https://readthedocs.org/projects/pyspaces/badge/\n :target: https://pyspaces.readthedocs.org/en/latest/",
"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/Friz-zy/pyspaces",
"keywords": "linux,container,namespaces",
"license": "MIT",
"maintainer": null,
"maintainer_email": null,
"name": "pyspaces",
"package_url": "https://pypi.org/project/pyspaces/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/pyspaces/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "https://github.com/Friz-zy/pyspaces"
},
"release_url": "https://pypi.org/project/pyspaces/1.4.1/",
"requires_dist": null,
"requires_python": null,
"summary": "Create process in linux namespaces",
"version": "1.4.1"
},
"last_serial": 2273323,
"releases": {
"1.0": [
{
"comment_text": "",
"digests": {
"md5": "e467350c3d312edc7a7df857684ff193",
"sha256": "e345393038feb2739680769200e7d4626c7a39322d6596a375c4d61d4289e84f"
},
"downloads": -1,
"filename": "pyspaces-1.0.tar.gz",
"has_sig": false,
"md5_digest": "e467350c3d312edc7a7df857684ff193",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5089,
"upload_time": "2015-04-16T15:55:45",
"url": "https://files.pythonhosted.org/packages/5b/0f/3c436a22db4c24251e2559e16da5780fa12e0a335a7a0393223b19b7bed1/pyspaces-1.0.tar.gz"
}
],
"1.0.5": [
{
"comment_text": "",
"digests": {
"md5": "a4157504030fc31ff4180090deff4e6e",
"sha256": "8d07e87903cd2763e6c1cde0243ad96206f6e40000d4bcfee88356fe4f641807"
},
"downloads": -1,
"filename": "pyspaces-1.0.5.tar.gz",
"has_sig": false,
"md5_digest": "a4157504030fc31ff4180090deff4e6e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5150,
"upload_time": "2015-04-18T09:06:29",
"url": "https://files.pythonhosted.org/packages/bc/62/a97eac27b8d8e7fb63ac38e012b7f011dba21945c4eb332ea5443ef7065e/pyspaces-1.0.5.tar.gz"
}
],
"1.1": [
{
"comment_text": "",
"digests": {
"md5": "efdf793fb6ed6a37dd7c73c1f83eb24b",
"sha256": "a4e33a8c33fad059253542f5c82b7de342047cd814e06e9d4356586b457d0f8e"
},
"downloads": -1,
"filename": "pyspaces-1.1.tar.gz",
"has_sig": false,
"md5_digest": "efdf793fb6ed6a37dd7c73c1f83eb24b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5960,
"upload_time": "2015-04-18T20:40:03",
"url": "https://files.pythonhosted.org/packages/c3/7f/194603570d2caa7debf71eb60f9bd61c40b851a0500a385b1a18f78e4d35/pyspaces-1.1.tar.gz"
}
],
"1.1.1": [],
"1.1.2": [
{
"comment_text": "",
"digests": {
"md5": "d59c7aee3ed330ff7e3c3ea925369b07",
"sha256": "74425fb148c22cfe4e7a90d06ed144212d7596be659a1f8fc30da7b9b2c9ce51"
},
"downloads": -1,
"filename": "pyspaces-1.1.2.tar.gz",
"has_sig": false,
"md5_digest": "d59c7aee3ed330ff7e3c3ea925369b07",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6284,
"upload_time": "2015-04-19T08:17:44",
"url": "https://files.pythonhosted.org/packages/33/9f/7ed121aec6cd62fca23d9a08c967e9b76b8823abc8d8f61a20e157189baa/pyspaces-1.1.2.tar.gz"
}
],
"1.1.3": [
{
"comment_text": "",
"digests": {
"md5": "72cb2a3f941930ab9f599ef22091ec33",
"sha256": "7e9e6da4dd60f56963bf2acb90e13b92c86b05f3fd11f6aab510c9bcc3bd99d8"
},
"downloads": -1,
"filename": "pyspaces-1.1.3.tar.gz",
"has_sig": false,
"md5_digest": "72cb2a3f941930ab9f599ef22091ec33",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6547,
"upload_time": "2015-04-20T12:50:08",
"url": "https://files.pythonhosted.org/packages/0a/04/e5122a379e4763a2513864889e900ac16dde5a8e06382ead7b6012600477/pyspaces-1.1.3.tar.gz"
}
],
"1.2": [
{
"comment_text": "",
"digests": {
"md5": "a4b22a8eec1acf9b3cbcd3cfb7d949da",
"sha256": "c107ce6456df6ec22a07b515f11bf5b31d6a8691449d0623da44dc0f8240e46b"
},
"downloads": -1,
"filename": "pyspaces-1.2.tar.gz",
"has_sig": false,
"md5_digest": "a4b22a8eec1acf9b3cbcd3cfb7d949da",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7430,
"upload_time": "2015-04-21T14:45:11",
"url": "https://files.pythonhosted.org/packages/7a/83/9335ee468e377d30ce58d8f1b2868a7d48e9ed4418d7ddb9c5198a6ab609/pyspaces-1.2.tar.gz"
}
],
"1.2.1": [
{
"comment_text": "",
"digests": {
"md5": "04918396774d725ca246f0d9d999b514",
"sha256": "ed1fa1239c99394a31ac6a780f6fd9e9dd494d0bfb13ca72001277fd88f6b005"
},
"downloads": -1,
"filename": "pyspaces-1.2.1.tar.gz",
"has_sig": false,
"md5_digest": "04918396774d725ca246f0d9d999b514",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7438,
"upload_time": "2015-04-21T14:51:33",
"url": "https://files.pythonhosted.org/packages/60/23/e4fd7747456673fb31b4590f7593ae54b1c0c99afd1e8abd1189cadc6d83/pyspaces-1.2.1.tar.gz"
}
],
"1.2.2": [
{
"comment_text": "",
"digests": {
"md5": "71ad3936cdf16f5c6040169b50591b99",
"sha256": "695ee4f823e48748d7c4900cd4cf4f0829e9f8d8656d8f63eccf63af6c93e30c"
},
"downloads": -1,
"filename": "pyspaces-1.2.2.tar.gz",
"has_sig": false,
"md5_digest": "71ad3936cdf16f5c6040169b50591b99",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7438,
"upload_time": "2015-04-21T14:53:16",
"url": "https://files.pythonhosted.org/packages/f0/c7/73b8d619074f6e241567e4ed8b026d7ebd6bfe35090d692b2b2d10dd8402/pyspaces-1.2.2.tar.gz"
}
],
"1.2.3": [
{
"comment_text": "",
"digests": {
"md5": "cb830e14424e3e076536192d8b17ba78",
"sha256": "0a7d16d10d24e8bc5fad2bef17b3455809343c24dba2cd3f79dc6b769c7a8154"
},
"downloads": -1,
"filename": "pyspaces-1.2.3.tar.gz",
"has_sig": false,
"md5_digest": "cb830e14424e3e076536192d8b17ba78",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8168,
"upload_time": "2015-04-30T14:47:28",
"url": "https://files.pythonhosted.org/packages/8d/4a/063078f900520c18b5cc413ce2050c98f5656ce7bcc7d51cdc40a6604a6a/pyspaces-1.2.3.tar.gz"
}
],
"1.2.4": [
{
"comment_text": "",
"digests": {
"md5": "adf4f397c7154dfc740c42ecaa420a36",
"sha256": "adcf51b79ece1e751a7f91c9089a127a43e612bfb0b5f3fc521bb0881b561665"
},
"downloads": -1,
"filename": "pyspaces-1.2.4.tar.gz",
"has_sig": false,
"md5_digest": "adf4f397c7154dfc740c42ecaa420a36",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8774,
"upload_time": "2015-05-02T18:15:33",
"url": "https://files.pythonhosted.org/packages/42/af/739ddbdec84cfa43caa0886654976cd7545b7993b784042455fbb996e98b/pyspaces-1.2.4.tar.gz"
}
],
"1.3": [
{
"comment_text": "",
"digests": {
"md5": "f8096377945d700db158034667961a8a",
"sha256": "a4206067b1623e1622461edea9a793f644953cb04cb319bdec81cbd354bd0248"
},
"downloads": -1,
"filename": "pyspaces-1.3.tar.gz",
"has_sig": false,
"md5_digest": "f8096377945d700db158034667961a8a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10247,
"upload_time": "2015-05-14T21:10:05",
"url": "https://files.pythonhosted.org/packages/dc/80/e5408212fbaf2c62c4ee6fcce4e5d30ee5418c51fa6088dee1695eae03a8/pyspaces-1.3.tar.gz"
}
],
"1.3.1": [
{
"comment_text": "",
"digests": {
"md5": "f593a9fadd25cc24f4bfcb678f30cc28",
"sha256": "7842833bc12b685d08c5b4cd71926577416fa651465c5d6298222b63ae53230f"
},
"downloads": -1,
"filename": "pyspaces-1.3.1.tar.gz",
"has_sig": false,
"md5_digest": "f593a9fadd25cc24f4bfcb678f30cc28",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10437,
"upload_time": "2015-05-26T18:46:30",
"url": "https://files.pythonhosted.org/packages/81/06/d86b0ba39e09ec6871cc0ddab34ae3e77579fe28fd4814224f90ceceb021/pyspaces-1.3.1.tar.gz"
}
],
"1.4": [
{
"comment_text": "",
"digests": {
"md5": "12c9a012cd66095279c447acaa3d267f",
"sha256": "cecd2e8e2e97d4fd910896fa8e4d2315e457214a815f210a0fd1221432bcd39f"
},
"downloads": -1,
"filename": "pyspaces-1.4.tar.gz",
"has_sig": false,
"md5_digest": "12c9a012cd66095279c447acaa3d267f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12794,
"upload_time": "2015-06-18T20:58:48",
"url": "https://files.pythonhosted.org/packages/0f/a6/585cd21527e130e341170d54ae75e2d666229a962774fd79c7702f9c9732/pyspaces-1.4.tar.gz"
}
],
"1.4.1": [
{
"comment_text": "",
"digests": {
"md5": "01bb88298bd2f5d53a77da94b0c06145",
"sha256": "cf3b224450d655255a36e3db01e85800fc04df2df8e04ae608e9d724c8184af1"
},
"downloads": -1,
"filename": "pyspaces-1.4.1.tar.gz",
"has_sig": false,
"md5_digest": "01bb88298bd2f5d53a77da94b0c06145",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 14771,
"upload_time": "2016-08-10T09:25:27",
"url": "https://files.pythonhosted.org/packages/69/21/7afe1872acd4f2fe7cd50a8e686683caabf5fe9baf8c98009472ad3f3282/pyspaces-1.4.1.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "01bb88298bd2f5d53a77da94b0c06145",
"sha256": "cf3b224450d655255a36e3db01e85800fc04df2df8e04ae608e9d724c8184af1"
},
"downloads": -1,
"filename": "pyspaces-1.4.1.tar.gz",
"has_sig": false,
"md5_digest": "01bb88298bd2f5d53a77da94b0c06145",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 14771,
"upload_time": "2016-08-10T09:25:27",
"url": "https://files.pythonhosted.org/packages/69/21/7afe1872acd4f2fe7cd50a8e686683caabf5fe9baf8c98009472ad3f3282/pyspaces-1.4.1.tar.gz"
}
]
}