From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.3 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 2B1141F4B4 for ; Wed, 21 Oct 2020 21:26:07 +0000 (UTC) Received: by mail-qt1-x830.google.com with SMTP id m65so3350505qte.11 for ; Wed, 21 Oct 2020 14:26:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:mime-version :content-disposition; bh=YEAT5J4pncnYOnB53nb4GRY889se5zdzlec9XtcrEXw=; b=iUlzjW3eNk/thsDS76wGmVYoGO4bdLZLzIeo2uayefIx3gAyb4AaIq359OOtFuj9Ea vP50ABoOsJ0dwUOKgpXzqUS7P+SuWeZUXk3D518gV7w+zwG3cH9ZEqstduN7WAHr8kzx x7Dbs+2yWWzVVSTIJFifr8r46J6zVJ4a257kI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:mime-version:content-disposition; bh=YEAT5J4pncnYOnB53nb4GRY889se5zdzlec9XtcrEXw=; b=ADS/De2rGlVBO1c8fcgh7X+e+7b6OPOcUCV5V6GwJIoHx11T2hF8mdlt+2728hYJ8J 6ralzX1EArJFV/oAAT/5WNYr97vMBn+ToQYrz1UtoxnPSZXorShZwHXF8o1MpkFRD4tO F30EY/ObyLsEnXz8NDt2h603BSp7dld4FYx9tm86NS1xXb8dZVpddMTHFGbjCbIg5y2f Rzg9zq8Gp9kOwECNDjNTeAT7wVhApccRjfZcDiOWXmyxoVUDxzaRI9HZVEgw4HpF1dwE 1r9nMoxcYTp4xOq9r1WcnlpAqSd20Q0uVUPU1bkSjX6uanHzgJNyd6Z/wpXZaM5NKbXo hLrA== X-Gm-Message-State: AOAM531qEBcBrUV2is0L+1lFIm2lWH7Jnf7hqrX0+DAiI6SxKSs3HSI8 AGJCx9qi5FuN7T/6cUGh4zt55DPEtNa1dHCg X-Google-Smtp-Source: ABdhPJxQoj2kuF8mPOWlgWdSRIjKA/CzwdlsSCyFWCRNjQzKwm2uQdAthTqgsTPu0QtSqp+WH4fo7g== X-Received: by 2002:ac8:1ba6:: with SMTP id z35mr4981530qtj.204.1603315564962; Wed, 21 Oct 2020 14:26:04 -0700 (PDT) Received: from chatter.i7.local ([89.36.78.230]) by smtp.gmail.com with ESMTPSA id s16sm2204433qks.18.2020.10.21.14.26.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Oct 2020 14:26:04 -0700 (PDT) Date: Wed, 21 Oct 2020 17:26:02 -0400 From: Konstantin Ryabitsev To: meta@public-inbox.org Cc: ~monsieuricon/public-inbox@lists.sr.ht Subject: Announce: ezpi python library for writing to public-inbox v2 repos Message-ID: <20201021212602.fuiri67eaaw63usn@chatter.i7.local> Mail-Followup-To: meta@public-inbox.org, ~monsieuricon/public-inbox@lists.sr.ht MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline List-Id: Hello: I am writing a tool that would provide an "audit feed" of all pushes performed to git.kernel.org, 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": https://pypi.org/project/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, -K