Skip to content

Commit

Permalink
Merge pull request #19 from aspose-email-cloud/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Marat-Gumerov authored Apr 13, 2021
2 parents 3a946a6 + c54c7df commit 3abf4b1
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 14 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[![PYPI](https://img.shields.io/pypi/v/aspose-email-cloud)](https://pypi.org/project/aspose-email-cloud/) [![License](https://img.shields.io/github/license/aspose-email-cloud/aspose-email-cloud-python)](https://pypi.org/project/aspose-email-cloud/) ![tests](https://github.com/aspose-email-cloud/aspose-email-cloud-python/workflows/tests/badge.svg)

# Manage Emails in Cloud via Python REST SDK

[Aspose.Email Cloud SDK for Python](https://products.aspose.cloud/email/python) is a REST API SDK for creating email applications that work with standard email file formats such as Outlook MSG, EML, iCalendar files and VCard.

This SDK allows you to work with Aspose.Email Cloud REST APIs in your Python applications quickly and easily, with zero initial cost.
Expand All @@ -22,12 +23,12 @@ Aspose.Email Cloud is a REST API for creating email applications that work with
- Email configuration discovery.
- Disposable email address detection.

## Enhancements in Version 21.3
## Enhancements in Version 21.4

- IMAP native threads support added to the built-in Email client.
- New field ClientThreadMoveRequest.SourceFolder added to specify a folder to move a thread from.

See [Release notes](https://docs.aspose.cloud/email/aspose-email-cloud-21-3-release-notes/).
See [Release notes](https://docs.aspose.cloud/email/aspose-email-cloud-21-4-release-notes/).

## How to use the SDK?
The complete source code is available in the [GIT repository](https://github.com/aspose-email-cloud/aspose-email-cloud-python/tree/master/sdk/AsposeEmailCloudSdk).
Expand Down Expand Up @@ -64,16 +65,18 @@ email_cloud = api.EmailCloud(client_secret, client_id)
Use `AiBcrApi.parse` method to parse business card image to VCard DTO:
```python
path = 'path/to/image/to/parse.png'
result = email_cloud.ai.bcr.parse(models.AiBcrParseRequest(image_file))
result = email_cloud.ai.bcr.parse(models.AiBcrParseRequest(
file=image_file,
is_single=True))
contact = result.value[0]
assert 'Parsed Display Name' in contact.display_name
```

## Aspose.Email Cloud SDKs in Popular Languages

| .NET | Java | PHP | Python | Ruby | Node.js |
|---|---|---|---|---|---|
|------|------|-----|--------|------|---------|
| [GitHub](https://github.com/aspose-email-cloud/aspose-email-cloud-dotnet) | [GitHub](https://github.com/aspose-email-cloud/aspose-email-cloud-java) | [GitHub](https://github.com/aspose-email-cloud/aspose-email-cloud-php) | [GitHub](https://github.com/aspose-email-cloud/aspose-email-cloud-python) | [GitHub](https://github.com/aspose-email-cloud/aspose-email-cloud-ruby) | [GitHub](https://github.com/aspose-email-cloud/aspose-email-cloud-node) | [GitHub](https://github.com/aspose-email-cloud/aspose-email-cloud-android) | [GitHub](https://github.com/aspose-email-cloud/aspose-email-cloud-swift)|[GitHub](https://github.com/aspose-email-cloud/aspose-email-cloud-dart) |[GitHub](https://github.com/aspose-email-cloud/aspose-email-cloud-go) |
| [NuGet](https://www.nuget.org/packages/Aspose.Email-Cloud/) | [Maven](https://repository.aspose.cloud/webapp/#/artifacts/browse/tree/General/repo/com/aspose/aspose-email-cloud) | [Composer](https://packagist.org/packages/aspose/aspose-email-cloud) | [PIP](https://pypi.org/project/aspose.email-cloud/) | [GEM](https://rubygems.org/gems/aspose_email_cloud) | [NPM](https://www.npmjs.com/package/@asposecloud/aspose-email-cloud) |

[Product Page](https://products.aspose.cloud/email/python) | [Documentation](https://docs.aspose.cloud/email/) | [Demo](https://products.aspose.app/email/family) | [Swagger UI](https://apireference.aspose.cloud/email/) | [Blog](https://blog.aspose.cloud/category/email/) | [Free support](https://forum.aspose.cloud/c/email) | [Free trial](https://dashboard.aspose.cloud/#/apps) | [SDK reference documentation](https://docs.aspose.cloud/email/reference-api)
[Product Page](https://products.aspose.cloud/email/python) | [Documentation](https://docs.aspose.cloud/email/) | [Demo](https://products.aspose.app/email/family) | [Swagger UI](https://apireference.aspose.cloud/email/) | [Blog](https://blog.aspose.cloud/category/email/) | [Free support](https://forum.aspose.cloud/c/email) | [Free trial](https://dashboard.aspose.cloud/#/apps) | [SDK reference documentation](https://docs.aspose.cloud/email/reference-api)
2 changes: 1 addition & 1 deletion sdk/AsposeEmailCloudSdk/api/client_message_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def fetch_file(self, request: ClientMessageFetchFileRequest) -> str:
def list(self, request: ClientMessageListRequest) -> MailMessageBaseList:
"""Get messages from folder, filtered by query
The query string should have the following view. The example of a simple expression: '<Field name>' <Comparison operator> '<Field value>', where &lt;Field Name&gt; - the name of a message field through which filtering is made, &lt;Comparison operator&gt; - comparison operators, as their name implies, allow to compare message field and specified value, &lt;Field value&gt; - value to be compared with a message field. The number of simple expressions can make a compound one, ex.: (<Simple expression 1> & <Simple expression 2>) | <Simple expression 3 >, where \"&amp;\" - logical-AND operator, \"|\" - logical-OR operator At present the following values are allowed as a field name (<Field name>): \"To\" - represents a TO field of message, \"Text\" - represents string in the header or body of the message, \"Bcc\" - represents a BCC field of message, \"Body\" - represents a string in the body of message, \"Cc\" - represents a CC field of message, \"From\" - represents a From field of message, \"Subject\" - represents a string in the subject of message, \"InternalDate\" - represents an internal date of message, \"SentDate\" - represents a sent date of message Additionally, the following field names are allowed for IMAP-protocol: \"Answered\" - represents an /Answered flag of message \"Seen\" - represents a /Seen flag of message \"Flagged\" - represents a /Flagged flag of message \"Draft\" - represents a /Draft flag of message \"Deleted\" - represents a Deleted/ flag of message \"Recent\" - represents a Deleted/ flag of message \"MessageSize\" - represents a size (in bytes) of message Additionally, the following field names are allowed for Exchange: \"IsRead\" - Indicates whether the message has been read \"HasAttachment\" - Indicates whether or not the message has attachments \"IsSubmitted\" - Indicates whether the message has been submitted to the Outbox \"ContentClass\" - represents a content class of item Additionally, the following field names are allowed for pst/ost files: \"MessageClass\" - Represents a message class \"ContainerClass\" - Represents a folder container class \"Importance\" - Represents a message importance \"MessageSize\" - represents a size (in bytes) of message \"FolderName\" - represents a folder name \"ContentsCount\" - represents a total number of items in the folder \"UnreadContentsCount\" - represents the number of unread items in the folder. \"Subfolders\" - Indicates whether or not the folder has subfolders \"Read\" - the message is marked as having been read \"HasAttachment\" - the message has at least one attachment \"Unsent\" - the message is still being composed \"Unmodified\" - the message has not been modified since it was first saved (if unsent) or it was delivered (if sent) \"FromMe\" - the user receiving the message was also the user who sent the message \"Resend\" - the message includes a request for a resend operation with a non-delivery report \"NotifyRead\" - the user who sent the message has requested notification when a recipient first reads it \"NotifyUnread\" - the user who sent the message has requested notification when a recipient deletes it before reading or the Message object expires \"EverRead\" - the message has been read at least once The field value (<Field value>) can take the following values: For text fields - any string, For date type fields - the string of \"d-MMM-yyy\" format, ex. \"10-Feb-2009\", For flags (fields of boolean type) - either \"True\", or \"False\"
The query string should have the following view. The example of a simple expression: '<Field name>' <Comparison operator> '<Field value>', where &lt;Field Name&gt; - the name of a message field through which filtering is made, &lt;Comparison operator&gt; - comparison operators, as their name implies, allow to compare message field and specified value, &lt;Field value&gt; - value to be compared with a message field. The number of simple expressions can make a compound one, ex.: (<Simple expression 1> & <Simple expression 2>) | <Simple expression 3 >, where \"&amp;\" - logical-AND operator, \"|\" - logical-OR operator At present the following values are allowed as a field name (<Field name>): \"To\" - represents a TO field of message, \"Text\" - represents string in the header or body of the message, \"Bcc\" - represents a BCC field of message, \"Body\" - represents a string in the body of message, \"Cc\" - represents a CC field of message, \"From\" - represents a From field of message, \"Subject\" - represents a string in the subject of message, \"InternalDate\" - represents an internal date of message, \"SentDate\" - represents a sent date of message Additionally, the following field names are allowed for IMAP-protocol: \"Answered\" - represents an /Answered flag of message \"Seen\" - represents a /Seen flag of message \"Flagged\" - represents a /Flagged flag of message \"Draft\" - represents a /Draft flag of message \"Deleted\" - represents a Deleted/ flag of message \"Recent\" - represents a Deleted/ flag of message \"MessageSize\" - represents a size (in bytes) of message Additionally, the following field names are allowed for Exchange: \"IsRead\" - Indicates whether the message has been read \"HasAttachment\" - Indicates whether or not the message has attachments \"IsSubmitted\" - Indicates whether the message has been submitted to the Outbox \"ContentClass\" - represents a content class of item The field value (<Field value>) can take the following values: For text fields - any string, For date type fields - the string of \"d-MMM-yyy\" format, ex. \"10-Feb-2009\", For flags (fields of boolean type) - either \"True\", or \"False\"
:param request: ClientMessageListRequest object with parameters
:type request: ClientMessageListRequest
Expand Down
24 changes: 20 additions & 4 deletions sdk/docs/ClientAccountApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ result = models.EmailClientAccount(
client_id='clientId',
client_secret='clientSecret',
refresh_token='refreshToken',
login='[email protected]'))
login='[email protected]'),
cache_file=models.StorageFileLocation(
file_name='account.cache',
storage='First Storage',
folder_path='file/location/folder/on/storage'))
```
</details>

Expand Down Expand Up @@ -82,7 +86,11 @@ result = models.EmailClientAccount(
client_id='clientId',
client_secret='clientSecret',
refresh_token='refreshToken',
login='[email protected]'))
login='[email protected]'),
cache_file=models.StorageFileLocation(
file_name='account.cache',
storage='First Storage',
folder_path='file/location/folder/on/storage'))
```

</details>
Expand Down Expand Up @@ -240,7 +248,11 @@ request = models.ClientAccountSaveRequest(
client_id='clientId',
client_secret='clientSecret',
refresh_token='refreshToken',
login='[email protected]')))
login='[email protected]'),
cache_file=models.StorageFileLocation(
file_name='account.cache',
storage='First Storage',
folder_path='file/location/folder/on/storage')))
```

</details>
Expand Down Expand Up @@ -272,7 +284,11 @@ request = models.ClientAccountSaveRequest(
client_id='clientId',
client_secret='clientSecret',
refresh_token='refreshToken',
login='[email protected]')))
login='[email protected]'),
cache_file=models.StorageFileLocation(
file_name='account.cache',
storage='First Storage',
folder_path='file/location/folder/on/storage')))

// Call method:
api.client.account.save(request)
Expand Down
6 changes: 5 additions & 1 deletion sdk/docs/ClientAccountSaveRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ client_account_save_request = models.ClientAccountSaveRequest(
client_id='clientId',
client_secret='clientSecret',
refresh_token='refreshToken',
login='[email protected]')))
login='[email protected]'),
cache_file=models.StorageFileLocation(
file_name='account.cache',
storage='First Storage',
folder_path='file/location/folder/on/storage')))
```


Expand Down
2 changes: 1 addition & 1 deletion sdk/docs/ClientMessageApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ result = api.client.message.fetch_file(request)

Description: Get messages from folder, filtered by query

The query string should have the following view. The example of a simple expression: '<Field name>' <Comparison operator> '<Field value>', where &lt;Field Name&gt; - the name of a message field through which filtering is made, &lt;Comparison operator&gt; - comparison operators, as their name implies, allow to compare message field and specified value, &lt;Field value&gt; - value to be compared with a message field. The number of simple expressions can make a compound one, ex.: (<Simple expression 1> & <Simple expression 2>) | <Simple expression 3 >, where \"&amp;\" - logical-AND operator, \"|\" - logical-OR operator At present the following values are allowed as a field name (<Field name>): \"To\" - represents a TO field of message, \"Text\" - represents string in the header or body of the message, \"Bcc\" - represents a BCC field of message, \"Body\" - represents a string in the body of message, \"Cc\" - represents a CC field of message, \"From\" - represents a From field of message, \"Subject\" - represents a string in the subject of message, \"InternalDate\" - represents an internal date of message, \"SentDate\" - represents a sent date of message Additionally, the following field names are allowed for IMAP-protocol: \"Answered\" - represents an /Answered flag of message \"Seen\" - represents a /Seen flag of message \"Flagged\" - represents a /Flagged flag of message \"Draft\" - represents a /Draft flag of message \"Deleted\" - represents a Deleted/ flag of message \"Recent\" - represents a Deleted/ flag of message \"MessageSize\" - represents a size (in bytes) of message Additionally, the following field names are allowed for Exchange: \"IsRead\" - Indicates whether the message has been read \"HasAttachment\" - Indicates whether or not the message has attachments \"IsSubmitted\" - Indicates whether the message has been submitted to the Outbox \"ContentClass\" - represents a content class of item Additionally, the following field names are allowed for pst/ost files: \"MessageClass\" - Represents a message class \"ContainerClass\" - Represents a folder container class \"Importance\" - Represents a message importance \"MessageSize\" - represents a size (in bytes) of message \"FolderName\" - represents a folder name \"ContentsCount\" - represents a total number of items in the folder \"UnreadContentsCount\" - represents the number of unread items in the folder. \"Subfolders\" - Indicates whether or not the folder has subfolders \"Read\" - the message is marked as having been read \"HasAttachment\" - the message has at least one attachment \"Unsent\" - the message is still being composed \"Unmodified\" - the message has not been modified since it was first saved (if unsent) or it was delivered (if sent) \"FromMe\" - the user receiving the message was also the user who sent the message \"Resend\" - the message includes a request for a resend operation with a non-delivery report \"NotifyRead\" - the user who sent the message has requested notification when a recipient first reads it \"NotifyUnread\" - the user who sent the message has requested notification when a recipient deletes it before reading or the Message object expires \"EverRead\" - the message has been read at least once The field value (<Field value>) can take the following values: For text fields - any string, For date type fields - the string of \"d-MMM-yyy\" format, ex. \"10-Feb-2009\", For flags (fields of boolean type) - either \"True\", or \"False\"
The query string should have the following view. The example of a simple expression: '<Field name>' <Comparison operator> '<Field value>', where &lt;Field Name&gt; - the name of a message field through which filtering is made, &lt;Comparison operator&gt; - comparison operators, as their name implies, allow to compare message field and specified value, &lt;Field value&gt; - value to be compared with a message field. The number of simple expressions can make a compound one, ex.: (<Simple expression 1> & <Simple expression 2>) | <Simple expression 3 >, where \"&amp;\" - logical-AND operator, \"|\" - logical-OR operator At present the following values are allowed as a field name (<Field name>): \"To\" - represents a TO field of message, \"Text\" - represents string in the header or body of the message, \"Bcc\" - represents a BCC field of message, \"Body\" - represents a string in the body of message, \"Cc\" - represents a CC field of message, \"From\" - represents a From field of message, \"Subject\" - represents a string in the subject of message, \"InternalDate\" - represents an internal date of message, \"SentDate\" - represents a sent date of message Additionally, the following field names are allowed for IMAP-protocol: \"Answered\" - represents an /Answered flag of message \"Seen\" - represents a /Seen flag of message \"Flagged\" - represents a /Flagged flag of message \"Draft\" - represents a /Draft flag of message \"Deleted\" - represents a Deleted/ flag of message \"Recent\" - represents a Deleted/ flag of message \"MessageSize\" - represents a size (in bytes) of message Additionally, the following field names are allowed for Exchange: \"IsRead\" - Indicates whether the message has been read \"HasAttachment\" - Indicates whether or not the message has attachments \"IsSubmitted\" - Indicates whether the message has been submitted to the Outbox \"ContentClass\" - represents a content class of item The field value (<Field value>) can take the following values: For text fields - any string, For date type fields - the string of \"d-MMM-yyy\" format, ex. \"10-Feb-2009\", For flags (fields of boolean type) - either \"True\", or \"False\"

Returns: List of MailMessageBase objects that represent fetched message in requested format.

Expand Down
6 changes: 5 additions & 1 deletion sdk/docs/EmailClientAccount.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ email_client_account = models.EmailClientAccount(
client_id='clientId',
client_secret='clientSecret',
refresh_token='refreshToken',
login='[email protected]'))
login='[email protected]'),
cache_file=models.StorageFileLocation(
file_name='account.cache',
storage='First Storage',
folder_path='file/location/folder/on/storage'))
```


Expand Down
2 changes: 1 addition & 1 deletion sdk/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from setuptools import setup, find_packages # noqa: H301

NAME = "aspose-email-cloud"
VERSION = "20.12.0"
VERSION = "21.4.0.140"
# To install the library, run the following
#
# python setup.py install
Expand Down

0 comments on commit 3abf4b1

Please sign in to comment.