<commit_before>================
 Cheese Pyramid
================

A simple python package index built as an extensible pyramid
application.


TODO
====

...<commit_msg>port over emporium readme<commit_after>================
 Cheese Pyramid
================

A simple application for managing a static python package index.  It
borrows heavily from `BasketWeaver` and `cheese_emporium`.  It
leverages `pip` and `setuptools/distribute` for various package
management tasks.


Running
=======

Dev
---

The following will start the application and a static file server for
`CheesePrism` suitable for testing and development::

 $ paster serve development.ini


Prod
----

`CheesePrism` doesn't pretend to be good at serving flat files.

For a more durable and performing setup, you will want to split the
serving between a wsgi host for the management application and a
industrial strength file server (say nginx).

Configure Nginx
~~~~~~~~~~~~~~~

See `sample-nginx.conf` and replace `alias CheesePrizm/files;` and
`alias CheesePrizm/static` with your fileroot and static filepath.
 
:todo:
  have start up announce static and file_root (and document)


Serve management app
~~~~~~~~~~~~~~~~~~~~

Use the prod.ini (edited for your setup) for simplest serving::

 $ paster serve prod.ini

:todo:
  ini config generation script


How to use
==========

CheesePrism understand the upload interface of pypi. This means for
python2.6 and better you can setup your ~/.pypirc and then upload to
your prism as you would pypi::

 [distutils]
    index-servers =
        pypi
        local


 [pypi]
    username:user
    password:<PASSWORD>

 [local]
    # your prism of fromage
    username:user
    password:<PASSWORD>
    repository:http://mycheese


The you can upload a source ala::

  $  cd /src/MyAwesomePyPkg
  $  python setup.py sdist upload -r local

The prism currently doesn't do anything with the credentials
(patches welcome).

Now your package is available for install from your prism::

  $ pip install -i http://mycheese/index/ MyAwesomePyPkg

{'fraction_non_alphanumeric': 0.11566617862371889, 'fraction_numerical': 0.0009760858955588092, 'mean_word_length': 4.036855036855036, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3244151', 'n_tokens_mistral': 615, 'n_tokens_neox': 568, 'n_words': 247}