Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(12)  |  Call(10)  |  Derive(0)  |  Import(2)

src/f/l/flanker-0.4.14/flanker/mime/create.py   flanker(Download)
""" This package is a set of utilities and methods for building mime messages """
 
import uuid
from flanker.mime.message import ContentType, utils
from flanker.mime.message.part import MimePart, Body, Part, adjust_content_type
def multipart(subtype):
    return MimePart(
        container=Part(
            ContentType(
                "multipart", subtype, {"boundary": uuid.uuid4().hex})),
def message_container(message):
    part = MimePart(
        container=Part(ContentType("message", "rfc822")),
        enclosed=message)
    message.set_root(False)
def text(subtype, body, charset=None, disposition=None, filename=None):
    return MimePart(
        container=Body(
            content_type=ContentType("text", subtype),
            body=body,
def binary(maintype, subtype, body, filename=None,
           disposition=None, charset=None):
    return MimePart(
        container=Body(
            content_type=ContentType(maintype, subtype),

src/f/l/flanker-HEAD/flanker/mime/create.py   flanker(Download)
""" This package is a set of utilities and methods for building mime messages """
 
import uuid
from flanker.mime.message import ContentType, utils
from flanker.mime.message.part import MimePart, Body, Part, adjust_content_type
def multipart(subtype):
    return MimePart(
        container=Part(
            ContentType(
                "multipart", subtype, {"boundary": uuid.uuid4().hex})),
def message_container(message):
    part = MimePart(
        container=Part(ContentType("message", "rfc822")),
        enclosed=message)
    message.set_root(False)
def text(subtype, body, charset=None, disposition=None, filename=None):
    return MimePart(
        container=Body(
            content_type=ContentType("text", subtype),
            body=body,
def binary(maintype, subtype, body, filename=None,
           disposition=None, charset=None):
    return MimePart(
        container=Body(
            content_type=ContentType(maintype, subtype),