|
| 1 | +pypicloud-tools |
| 2 | +=============== |
| 3 | + |
| 4 | +`View this on GitHub |
| 5 | +Pages <http://ccpgames.github.io/pypicloud-tools/>`__ |
| 6 | + |
| 7 | +|Build Status| |Coverage Status| |Version| |Download format| |Downloads |
| 8 | +this month| |Development Status| |License| |
| 9 | + |
| 10 | +Tools to bypass a PyPICloud installation and communicate directly with |
| 11 | +S3 |
| 12 | + |
| 13 | +Utilities |
| 14 | +--------- |
| 15 | + |
| 16 | +Upload |
| 17 | +~~~~~~ |
| 18 | + |
| 19 | +Uploads file(s) to the PyPICloud S3 bucket directly and performs an |
| 20 | +admin API call to rebuild the PyPICloud index after. |
| 21 | + |
| 22 | +Example: |
| 23 | + |
| 24 | +.. code:: bash |
| 25 | +
|
| 26 | + $ upload dist/* |
| 27 | + Uploading example_project/example-project-0.0.1.tar.gz .....1 done! |
| 28 | + Uploading example_project/example_project-0.0.1-py2-none-any.whl .....1 done! |
| 29 | + Uploading example_project/example_project-0.0.1-py2.7.egg ......1 done! |
| 30 | + PyPICloud server at http://your.pypicloud.server/pypi updated |
| 31 | +
|
| 32 | +The numbers displayed are the amount of 50MB chunks you've sent to S3 as |
| 33 | +they send. It's fine if the file names use altering hypens/underscores |
| 34 | +per release type like you see above, they only need to match the initial |
| 35 | +part of the key before the ``/`` to be considered the same package. |
| 36 | + |
| 37 | +Download |
| 38 | +~~~~~~~~ |
| 39 | + |
| 40 | +Downloads the latest or a specific version directly from S3. Does not |
| 41 | +talk to PyPICloud and does not install the downloaded package. You can |
| 42 | +use pip to do either/both of those things. |
| 43 | + |
| 44 | +Also possible with the download command is the ``--url`` flag to only |
| 45 | +print a download URL (usable for 5 minutes). |
| 46 | + |
| 47 | +By default, if there are multiple releases of the same package+release, |
| 48 | +download will prefer wheels, then eggs, then source distributions. You |
| 49 | +can override that behavior with the ``--egg`` and ``--src`` flags. |
| 50 | + |
| 51 | +Examples: |
| 52 | + |
| 53 | +.. code:: bash |
| 54 | +
|
| 55 | + $ download example_project=0.0.1 |
| 56 | + example_project-0.0.1-py2-none-any.whl |
| 57 | +
|
| 58 | +.. code:: bash |
| 59 | +
|
| 60 | + $ download example_project --egg |
| 61 | + example_project-0.0.1-py2.7.egg |
| 62 | +
|
| 63 | +Pipes and redirects work like you'd expect: |
| 64 | + |
| 65 | +.. code:: bash |
| 66 | +
|
| 67 | + $ download example_project --src | tar -xzf - |
| 68 | +
|
| 69 | +List |
| 70 | +~~~~ |
| 71 | + |
| 72 | +Lists a package's releases, or releases of a package at a specific |
| 73 | +version. Again, talks straight to S3 and bypasses the PyPICloud |
| 74 | +installation. |
| 75 | + |
| 76 | +Example: |
| 77 | + |
| 78 | +.. code:: bash |
| 79 | +
|
| 80 | + $ list example_project |
| 81 | + example-project-0.0.1.tar.gz |
| 82 | + example_project-0.0.1-py2.7.egg |
| 83 | + example_project-0.0.1-py2-none-any.whl |
| 84 | +
|
| 85 | +Listing multiple packages or packages with a version specifier is also |
| 86 | +supported. |
| 87 | + |
| 88 | +When called without any arguments, ``list`` will display all known |
| 89 | +packages. |
| 90 | + |
| 91 | +Rehost |
| 92 | +~~~~~~ |
| 93 | + |
| 94 | +Rehosts an upstream package from PyPI into the pypicloud installation. |
| 95 | +This can be handy if you have pypicloud clients which only have access |
| 96 | +to it and s3 but not the rest of the internet. |
| 97 | + |
| 98 | +Example: |
| 99 | + |
| 100 | +.. code:: bash |
| 101 | +
|
| 102 | + $ rehost requests==1.0.0 |
| 103 | + Collecting requests==1.0.0 |
| 104 | + Downloading requests-1.0.0.tar.gz (335kB) |
| 105 | + 100% |████████████████████████████████| 335kB 929kB/s |
| 106 | + Saved /var/folders/53/kl4v4_9509ng148kp_pwmc5h0000gn/T/tmpuj5JUJ/requests-1.0.0.tar.gz |
| 107 | + Successfully downloaded requests |
| 108 | + Uploading requests/requests-1.0.0.tar.gz ............1 done! |
| 109 | + PyPICloud server at http://your_pypicloud_server/pypi updated |
| 110 | +
|
| 111 | +If a specific version is not provided, the latest will be used. Multiple |
| 112 | +packages can be used in the same command. |
| 113 | + |
| 114 | +Installation |
| 115 | +------------ |
| 116 | + |
| 117 | +Simple |
| 118 | +~~~~~~ |
| 119 | + |
| 120 | +.. code:: bash |
| 121 | +
|
| 122 | + $ pip install pypicloud-tools |
| 123 | +
|
| 124 | +From source |
| 125 | +~~~~~~~~~~~ |
| 126 | + |
| 127 | +.. code:: bash |
| 128 | +
|
| 129 | + $ git clone https://github.com/ccpgames/pypicloud-tools.git |
| 130 | + $ cd pypicloud-tools |
| 131 | + $ python setup.py install |
| 132 | +
|
| 133 | +Configuration |
| 134 | +------------- |
| 135 | + |
| 136 | +Configuration for pypicloud-tools piggybacks on your ``~/.pypirc`` file. |
| 137 | +You can specify an alternate config file with the ``--config`` flag, but |
| 138 | +it must be in the same syntax. That syntax is: |
| 139 | + |
| 140 | +.. code:: conf |
| 141 | +
|
| 142 | + [pypicloud] |
| 143 | + repository:http://your.pypicloud.server/pypi |
| 144 | + username:admin |
| 145 | + password:hunter7 |
| 146 | + bucket:your_bucket |
| 147 | + access:some_key |
| 148 | + secret:other_key |
| 149 | + acl:optional_acl |
| 150 | +
|
| 151 | +The key **must** be ``pypicloud``, it is the only key pypicloud-tools |
| 152 | +will look at. The username/password combination should have admin |
| 153 | +credentials on the PyPICloud installation as it needs to call |
| 154 | +``/admin/rebuild`` after a succesful upload. |
| 155 | + |
| 156 | +Copyright and License |
| 157 | +===================== |
| 158 | + |
| 159 | +pypicloud-tools was written by Adam Talsma |
| 160 | + |
| 161 | +Copyright (c) 2015 CCP hf. |
| 162 | + |
| 163 | +Permission is hereby granted, free of charge, to any person obtaining a |
| 164 | +copy of this software and associated documentation files (the |
| 165 | +"Software"), to deal in the Software without restriction, including |
| 166 | +without limitation the rights to use, copy, modify, merge, publish, |
| 167 | +distribute, sublicense, and/or sell copies of the Software, and to |
| 168 | +permit persons to whom the Software is furnished to do so, subject to |
| 169 | +the following conditions: |
| 170 | + |
| 171 | +The above copyright notice and this permission notice shall be included |
| 172 | +in all copies or substantial portions of the Software. |
| 173 | + |
| 174 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 175 | +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 176 | +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 177 | +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
| 178 | +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
| 179 | +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
| 180 | +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 181 | + |
| 182 | +.. |Build Status| image:: https://travis-ci.org/ccpgames/pypicloud-tools.png?branch=master |
| 183 | + :target: https://travis-ci.org/ccpgames/pypicloud-tools |
| 184 | +.. |Coverage Status| image:: https://coveralls.io/repos/ccpgames/pypicloud-tools/badge.svg?branch=master |
| 185 | + :target: https://coveralls.io/r/ccpgames/pypicloud-tools?branch=master |
| 186 | +.. |Version| image:: https://img.shields.io/pypi/v/pypicloud-tools.svg |
| 187 | + :target: https://pypi.python.org/pypi/pypicloud-tools/ |
| 188 | +.. |Download format| image:: https://img.shields.io/badge/format-wheel-green.svg? |
| 189 | + :target: https://pypi.python.org/pypi/pypicloud-tools/ |
| 190 | +.. |Downloads this month| image:: https://img.shields.io/pypi/dm/pypicloud-tools.svg |
| 191 | + :target: https://pypi.python.org/pypi/pypicloud-tools/ |
| 192 | +.. |Development Status| image:: https://img.shields.io/badge/status-beta-orange.svg |
| 193 | + :target: https://pypi.python.org/pypi/pypicloud-tools/ |
| 194 | +.. |License| image:: https://img.shields.io/github/license/ccpgames/pypicloud-tools.svg |
| 195 | + :target: https://pypi.python.org/pypi/pypicloud-tools/ |
0 commit comments