Skip to main content

A simple, lightweight Python Package Index (aka Cheeseshop) clone.

Project description

Overview

EggBasket is a web application which provides a service similar and compatible to the Python Package Index (aka Cheeseshop). It allows you to maintain your own local repository of Python packages required by your installations.

It is implemented using the TurboGears web framework, Genshi and SQLAlchemy.

Features

  • Can be used by setuptools/easy_install as the package index and repository.

  • Supports distutils upload protocol.

  • Has simple role-based permission system to restrict package uploads (but see TODO).

  • Requires only SQLite database (included with Python 2.5).

  • Is able to read and display meta data from the following distribution package formats (source and binary):

    .egg, .tar, .tar.bz2, .tar.gz, .tgz, .zip

  • Any other file format can be configured to be listed under the distribution files for a package (by default this includes .exe and .rpm and .tar.Z files in addition to the filetypes listed above).

  • Can be run without any configuration by just starting it from within a directory containing package directories (see “Usage”).

Todo

  • Improve permission system to allow closed-shop repositories on an open network or uploading for anonymous users.

  • Add support for MD5 check sums and GPG signatures.

  • Add more error and sanity checks to the upload handling.

  • Add pagination to the main package list.

  • Support deletion of packages through web interface.

  • Cache package listings and meta data.

  • Add admin interface for adding users and groups and setting configuration values (use dbspockets?).

Acknowledgments

This application is a re-implementation (almost no shared code) of the haufe.eggserver Grok application with some improvements.

Installation

To install EggBasket from the Cheeseshop use easy_install:

[sudo] easy_install EggBasket

This requires the setuptools package to be installed. If you have not done so already, download the ez_setup.py script and run it to install setuptools.

Usage

  • Your packages should all reside under a common root directory, with a sub-directory for each package with the same base name as the distribution. The sub-directories should each contain the egg files and source archives for all available versions of the package. The package diretories will be created by the application when using the upload command (see below).

  • To start the application server, open a terminal, change to the directory which contains the packages and then run:

    eggbasket-server [<config file>]

    You can also set the location of the package root directory in the configuration with the eggbasket.package_root setting and start the server anywheer you want.

    If no configuration file is specified on the command line, the default configuration file included in the egg will be used. The default configuration file can also be found in the source distribution and be adapted for your environment.

    The server either needs write permissions to directory where it is started, or you need to change the path to the database and the access log in the configuration so they can be written by the server.

  • To stop the server just hit Control-C in the terminal or kill the process.

  • You can look at the package index with your web browser by opening the URL http://localhost:3442/. The default port 3442 can be changed by setting the server.socket_port option in the configuration file.

  • You can instruct easy_install to search & download packages from your package repository by specifying the URL to your server with the -i option:

    easy_install -i http://localhost:8080/ PACKAGE_NAME
  • You can upload a package to your repository with the distutils upload command, for example:

    python setup.py bdist_egg upload -r http://localhost:3442/upload

    This command will ask for your username and password on the server. You can store these and the repository URL in your .pypirc file. See the distutils documentation for more information.

  • By default, uploading is restricted to users in a group that has the upload permission. You can create an appropriate user, group and permission in the database by giving the --init option to the eggbasket-server command:

    eggbasket-server --init [<config file>]

    This will create a user with user_name/password “admin”, who belongs to the group “maintainers”, which has the “upload” permission. The database to use will be read from the config file.

    See the TurboGears documentation on Identity for background information.

  • Of course you can always just copy package distribution files manually in the filesystem to your repository or upload them to the appropriate place with scp etc. The application will find and list new files without the need to “register” them as is necessary with the original PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

EggBasket-0.1a.zip (153.0 kB view details)

Uploaded Source

EggBasket-0.1a.tar.bz2 (85.3 kB view details)

Uploaded Source

Built Distribution

EggBasket-0.1a-py2.5.egg (108.5 kB view details)

Uploaded Source

File details

Details for the file EggBasket-0.1a.zip.

File metadata

  • Download URL: EggBasket-0.1a.zip
  • Upload date:
  • Size: 153.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for EggBasket-0.1a.zip
Algorithm Hash digest
SHA256 f421f2eab14d96365faec9a4ff552386f98d623cb99b5bf420a1c14997c767cb
MD5 266bee215cb93f3b956920c6b6331547
BLAKE2b-256 15dbce3fa844a10fb3269f5448570f0bd07d1b4eb53a7e3e72482e97c4f0d36c

See more details on using hashes here.

File details

Details for the file EggBasket-0.1a.tar.bz2.

File metadata

  • Download URL: EggBasket-0.1a.tar.bz2
  • Upload date:
  • Size: 85.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for EggBasket-0.1a.tar.bz2
Algorithm Hash digest
SHA256 b733600c21e1e9763bc347c3237e1ac1be0b96ac515cb7979c67e820544ce07a
MD5 53342ee5ab9df33338efe7b9ce78a701
BLAKE2b-256 7d46ba8d18ea79cb10d581b1bc972f4fa6354f0d800978c996f82ec3c62cfe06

See more details on using hashes here.

File details

Details for the file EggBasket-0.1a-py2.5.egg.

File metadata

  • Download URL: EggBasket-0.1a-py2.5.egg
  • Upload date:
  • Size: 108.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for EggBasket-0.1a-py2.5.egg
Algorithm Hash digest
SHA256 5a1503312031bb982d477216bfcd0a07408338e12a5a6596959d066a7202cbd9
MD5 9c4fbcefdde6d53c5fd2e313ac73cad8
BLAKE2b-256 73d9c632acaee985630ef26e7a4a9260e350c66d9ee2f3d97180d58de4fd966a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page