semvec/pypi-packages huggingface dataset:
mr.parker 1.0
Ensures that the PyPI bus factor for a package is above a certain threshold.
License: BSD

Mr. Parker
==========

"With great power comes great responsibility" - Uncle Ben

Bus Factor
----------

At the 2009 Plone Conference the quote "we usually think of buses as things that
kill programmers" was overheard. A few days later, at the sprint, it was noticed
that a few core packages for Plone 4.0 could only be released by one person.
This package is designed to combat this by ensuring that a given package has
more than a certain number of authorised admins on PyPI.

Syntax
------

This creates a console script called ``parker`` as follows:

::

    parker [--factor=2] 
           [--versions-cfg <configfile>] 
           [--repository=http://pypi.python.org/pypi] [packagename(s)]

:--factor: (also -f) This determines the minimum number of people that have access before an error is raised.  The default is 2.
:--versions-cfg: (also -c) If this option is provided a ``zc.buildout`` versions file will be parsed for the package names
:--repository: (also -r) A repository URL that follows the baroque lookup logic assumptions
:packagename(s): Required if --versions-cfg isn't specified.  Contains one or more packages to check, space separated.

Baroque Lookup Logic
--------------------

Unfortunately, the API doesn't allow us to find what users have access to a
package, so we need to screen scrape. We expect HTML of the following format:

::

     <li>
      <strong>Package Index Owner:</strong>
      <span>deo, smcmahon, MatthewWilkes</span>
     </li>

     <li>
      <strong>Package Index Maintainer:</strong>
      <span>JoeBob</span>
     </li>

That is, a list element that contains Package Index <rolename>: and a comma
separated list, once the tags have been removed.

First, the li tags are extracted

::

    (?<=li\>)[\S\s]*?(?=\<\/li\>)

Then, the role name is extracted:

::

    "Package Index ([a-zA-Z]*)"

and the names are found with:

::

    set(a[0] for a in re.compile("([a-zA-Z]+,?)+?").findall(li) 
             if a[0] not in ['Package','Index',rolename,'span','strong'])

Yes, it is ugly. I know. I wish there was an API for this, or that the markup
was easily scrape-able. For now, this will do.
publickeymanager 0.3
Public Key Manager is designed to generate authorized_keys file and to distribute those to specified servers.
License: BSD

Description
===========

This program can be used to manage the public keys on multiple servers.
Specify in a configuration file which users with their public keys have
permission to login to which server with a specific username.

Publickeymanager is usefull if you have multiple users logging in to
shared accounts on multiple servers.

Config File
===========

The config file has the following options::

  [keys]
    Specify one public key per user.

  [group:`users`]
    Use this if you want to bundle multiple users to one group. Say for example
    a sysadmin group.

  [group:`name`]
    Specify a group of servers. `name` is the name of the group.
    A config file can hold multiple [group:`name`]
    directives.

Options for [group:`name`]
--------------------------

The options for the group::

  user_groups
    A reference to groups defined in [group:`users`].
    All users in the group have
    access to the servers in this group.

  access
    Which individual users have access to servers in this group.

  servers
    A list of servers which belong to this group.

  [server:`name`]
    Specify a server. A config file can hold multiple [server:`name`]
    directives.
    The name is the name of the server. A name can be referenced in a server
    group.

Options for [server:`name`]
---------------------------

The options for the server::

  hostname
    The hostname of the server.

  user
    The username that is used to login to the server.

  groups
    Define which groups have access to this server. Groups need to exist in
    [group:`name`]

  access
    Define which users have access to this server.
    Users need have a key file mentioned in [keys].

Example Config File
===================

An example config file which shows all options::

  [keys]
  roland=rvanlaar.pub
  example_user=example.pub
  example_user2=example2.pub

  [group:users]
  sysadmin =
    roland

  [group:remote]
  user_groups =
    sysadmin
  access =
    example_user1
  servers =
    example_server1
    example_server2

  [server:localhost]
  hostname = 127.0.0.1
  user = roland
  groups = sysadmin
  access = example

  [server:example_server1]
  hostname = example.com
  user = example

  [server:example_server2]
  hostname = example.org
  user = example


Changes
=======

0.3
---

- New authorized_keys file will have the same permissions as the old one.


0.2.4
-----

- Added check. A server needs to have at least one user that will have
  access to it.

0.2.3
-----

- Added time.sleep(1); Needed for a correct move via shell.send.
- Fixed parse bug for group:users

0.2.2
-----

- Fixed parse bug for group:users.

- [group:user] renamed to [group:users].

0.2.1
-----

- Removed old pdb line.

0.2
-----

- Fixed broken function parse_config.

- Added Changes and Readme to long description.

0.1.2
-----

- The directory for the public keys can be chosen with -d.

- Added more explanatory error messages.

0.1.1
-----

- Fixed egg install.


0.1
---

- Released the first version to pypi.