diff --git a/memphis/__init__.py b/memphis/__init__.py index 6265c77..6193199 100644 --- a/memphis/__init__.py +++ b/memphis/__init__.py @@ -1,3 +1,16 @@ +# Copyright 2021-2022 The Memphis Authors +# Licensed under the Apache License, Version 2.0 (the “License”); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an “AS IS” BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License + from memphis.memphis import Memphis import memphis.retention_types import memphis.storage_types diff --git a/memphis/http_request.py b/memphis/http_request.py index f589d27..851409a 100644 --- a/memphis/http_request.py +++ b/memphis/http_request.py @@ -1,3 +1,16 @@ +# Copyright 2021-2022 The Memphis Authors +# Licensed under the Apache License, Version 2.0 (the “License”); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an “AS IS” BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License + import requests import json @@ -13,13 +26,13 @@ def http_request(method, url, headers={}, body_params={}, query_params={}, file= try: typeOfMethod = { "GET": requests.get(url, headers=headers, timeout=timeout, - data=json.dumps(body_params), params=json.dumps(query_params)), - "POST":requests.post(url, headers=headers, timeout=timeout, - data=json.dumps(body_params), params=json.dumps(query_params)), + data=json.dumps(body_params), params=json.dumps(query_params)), + "POST": requests.post(url, headers=headers, timeout=timeout, + data=json.dumps(body_params), params=json.dumps(query_params)), 'PUT': requests.put(url, headers=headers, timeout=timeout, - data=json.dumps(body_params), params=json.dumps(query_params)), - 'DELETE':requests.delete(url, headers=headers, timeout=timeout, - data=json.dumps(body_params), params=json.dumps(query_params)) + data=json.dumps(body_params), params=json.dumps(query_params)), + 'DELETE': requests.delete(url, headers=headers, timeout=timeout, + data=json.dumps(body_params), params=json.dumps(query_params)) } response = typeOfMethod.get(method) if response.status_code != 200: diff --git a/memphis/memphis.py b/memphis/memphis.py index c85ac4a..94e3c32 100644 --- a/memphis/memphis.py +++ b/memphis/memphis.py @@ -1,3 +1,16 @@ +# Copyright 2021-2022 The Memphis Authors +# Licensed under the Apache License, Version 2.0 (the “License”); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an “AS IS” BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License + import socket import json import nats as broker diff --git a/memphis/retention_types.py b/memphis/retention_types.py index bd6db7d..82e8bd3 100644 --- a/memphis/retention_types.py +++ b/memphis/retention_types.py @@ -1,3 +1,16 @@ +# Copyright 2021-2022 The Memphis Authors +# Licensed under the Apache License, Version 2.0 (the “License”); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an “AS IS” BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License + MAX_MESSAGE_AGE_SECONDS = "message_age_sec" MESSAGES = "messages" BYTES = "bytes" diff --git a/memphis/storage_types.py b/memphis/storage_types.py index cadda62..ecb985e 100644 --- a/memphis/storage_types.py +++ b/memphis/storage_types.py @@ -1,2 +1,15 @@ +# Copyright 2021-2022 The Memphis Authors +# Licensed under the Apache License, Version 2.0 (the “License”); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an “AS IS” BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License + FILE = "file" MEMORY = "memory"