user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Konstantin Ryabitsev <>
Cc: ~monsieuricon/
Subject: Announce: ezpi python library for writing to public-inbox v2 repos
Date: Wed, 21 Oct 2020 17:26:02 -0400	[thread overview]
Message-ID: <20201021212602.fuiri67eaaw63usn@chatter.i7.local> (raw)


I am writing a tool that would provide an "audit feed" of all pushes 
performed to, so I needed a way to write to public-inbox 
v2 format repositories from Python. I figured this may be useful as a 
standalone library, so I published it as "ezpi":

For a quick summary:

  from email.message import EmailMessage
  from ezpi import add_rfc822

  msg = EmailMessage()
  msg.set_content('Hello world!')
  # We must have a Subject: and From: headers at least, in order
  # to make a useful git commit with that data
  msg['Subject'] = 'My excellent subject'
  msg['From'] = 'E.X. Ample <'>
  # We won't create the repo for you, so run "git init --bare" first
  add_rfc822('example.git', msg)

It may perhaps be useful to others.

Best regards,

                 reply	other threads:[~2020-10-21 21:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201021212602.fuiri67eaaw63usn@chatter.i7.local \ \ \
    --cc=~monsieuricon/ \
    --subject='Re: Announce: ezpi python library for writing to public-inbox v2 repos' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).